:root {
    /* Branding Colors based on Screenshot */
    --brand-primary: #ff4500; /* Requested Orange */
    --brand-primary-hover: #e63e00;
    --brand-bg: #FFFFFF; /* White Background */
    --brand-card: #FFFFFF;
    --brand-text: #1A1A1A;
    --brand-muted: #666666;
    --brand-border: #E5E5E5;
    --brand-dark: #000000; /* Black for text elements */
    
    /* Spacing & Radius */
    --radius: 12px;
    --radius-sm: 6px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
    
    /* Fonts */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--brand-bg);
    color: var(--brand-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content */
.main-content {
    padding-bottom: 60px;
    padding-top: 40px;
}

.hero-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--brand-dark);
}

.hero-text .lead {
    font-size: 1.2rem;
    color: var(--brand-muted);
    margin-bottom: 10px;
}

.hero-text .sub-lead {
    font-size: 1rem;
    color: var(--brand-primary);
    font-weight: 500;
}

/* Tool Card */
.tool-card {
    background: var(--brand-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--brand-border);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--brand-border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #FAFAFA;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--brand-primary);
    background: #FFF8F3; /* Very light orange tint */
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--brand-primary);
    margin-bottom: 15px;
}

.upload-content h3 {
    margin-bottom: 5px;
}

.file-info {
    display: block;
    font-size: 0.85rem;
    color: var(--brand-muted);
    margin: 10px 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242, 125, 38, 0.3);
}

.btn-primary.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
}

.btn-secondary:hover {
    background-color: var(--brand-primary);
    color: white;
}

.btn-text {
    background: none;
    color: var(--brand-muted);
    text-decoration: underline;
    font-size: 0.9rem;
    margin-top: 10px;
}

.btn-lg {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

/* File List */
.file-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.file-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
    position: relative;
    border: 1px solid #e9ecef;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.file-item:active {
    cursor: grabbing;
}

.file-item.dragging {
    opacity: 0.5;
    border: 2px dashed var(--brand-primary);
}

.file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    margin-top: 5px;
}

.file-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.2s;
}

.file-remove:hover {
    background: #cc0000;
}

/* Resize Inputs */
.resize-inputs {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.input-wrapper {
    flex: 1;
}

.input-wrapper label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: var(--brand-muted);
}

.input-text {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* Progress Bar */
.progress-container {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--brand-primary);
    transition: width 0.3s ease;
}

.progress-detail {
    font-size: 0.9rem;
    color: #666;
}

/* Settings */
.settings-panel {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--brand-border);
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group.full-width {
    grid-column: 1 / -1;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Slider */
.slider {
    width: 100%;
    height: 6px;
    background: #ddd;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--brand-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Resize Options */
.resize-options {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.chip {
    background: white;
    border: 1px solid #ddd;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chip.selected {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.input-text {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    margin-top: 5px;
}

/* Action Area */
.action-area {
    margin-top: 30px;
}

.error-message {
    color: #e74c3c;
    background: #fdecea;
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.9rem;
}

/* Progress Overlay */
.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Area */
.result-area {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #2ecc71;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
}

.stats-card {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: var(--radius);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--brand-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat.savings .stat-value {
    color: #2ecc71;
}

.download-note {
    font-size: 0.9rem;
    color: var(--brand-muted);
    margin-bottom: 20px;
}

/* Info Section */
.info-section {
    background: white;
    padding: 60px 0;
    border-top: 1px solid var(--brand-border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.info-col h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--brand-dark);
}

.info-col ul {
    padding-left: 20px;
}

.info-col li {
    margin-bottom: 8px;
}

/* FAQ */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.accordion-item {
    border-bottom: 1px solid var(--brand-border);
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 20px 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000000; /* Force Black */
    -webkit-tap-highlight-color: transparent; /* Remove mobile blue highlight */
}

.accordion-header:focus {
    outline: none;
}

.accordion-header:after {
    content: '+';
    font-size: 1.5rem;
    color: var(--brand-primary);
}

.accordion-header[aria-expanded="true"]:after {
    content: '-';
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    color: var(--brand-muted);
}

.accordion-content p {
    padding-bottom: 20px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.mt-2 { margin-top: 10px; }

/* Responsive */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .stats-card {
        flex-direction: column;
        gap: 15px;
    }
}
