/* CSS Reset and Base Styles */
:root {
    --primary-color: #2aa79b;
    --primary-dark: #238f85;
    --secondary-color: #ff7e5f;
    --accent-color: #ff6b8b;
    --success-color: #4ecdc4;
    --warning-color: #ff9f43;
    --error-color: #ff6b6b;
    --light-bg: #f8f9fa;
    --light-text: #2d3748;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --gray-light: #e2e8f0;
    --gray-medium: #a0aec0;
    --gray-dark: #4a5568;
}

.atfc-converter-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--light-text);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    transition: var(--transition);
    padding: 20px;
    box-sizing: border-box;
}

.atfc-converter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.atfc-converter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .atfc-converter-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

/* Card Styles */
.atfc-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.atfc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.atfc-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--gray-light);
}

.atfc-card h2 i {
    font-size: 1.5rem;
}

/* Form Styles */
.atfc-form-group {
    margin-bottom: 1.8rem;
}

.atfc-label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: var(--gray-dark);
}

.atfc-file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.atfc-file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.atfc-file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    border: 2px dashed var(--gray-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background-color: rgba(255, 255, 255, 0.7);
}

.atfc-file-input-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(42, 167, 155, 0.05);
}

.atfc-file-input-label.dragover {
    border-color: var(--primary-color);
    background-color: rgba(42, 167, 155, 0.1);
    transform: scale(1.02);
}

.atfc-file-input-label i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.atfc-file-input-label span {
    font-size: 1.1rem;
    color: var(--light-text);
}

.atfc-file-input-label .subtext {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-top: 0.5rem;
}

.atfc-select, .atfc-button {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--light-text);
    transition: var(--transition);
}

.atfc-select:focus, .atfc-button:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(42, 167, 155, 0.2);
}

.atfc-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1rem 1.5rem;
}

.atfc-button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(42, 167, 155, 0.3);
}

.atfc-button:active {
    transform: translateY(0);
}

.atfc-button:disabled {
    background: var(--gray-light);
    color: var(--gray-medium);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.atfc-button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.atfc-button-group .atfc-button {
    flex: 1;
}

.atfc-secondary-btn {
    background: var(--gray-light);
    color: var(--gray-dark);
}

.atfc-secondary-btn:hover {
    background: var(--gray-medium);
    color: white;
}

/* File Info Styles */
.atfc-file-info {
    margin-top: 1.8rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-light);
    display: none;
}

.atfc-file-info.active {
    display: block;
    animation: atfc-fadeIn 0.5s ease;
}

.atfc-file-details {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.atfc-file-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.atfc-file-detail:last-child {
    border-bottom: none;
}

/* Progress Bar Styles */
.atfc-progress-container {
    margin: 1.8rem 0;
    display: none;
}

.atfc-progress-container.active {
    display: block;
    animation: atfc-fadeIn 0.5s ease;
}

.atfc-progress-bar {
    height: 10px;
    background-color: var(--gray-light);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.atfc-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 5px;
}

.atfc-progress-text {
    text-align: center;
    font-size: 0.95rem;
    color: var(--gray-dark);
}

/* Result Section Styles */
.atfc-result-section {
    margin-top: 1.8rem;
    display: none;
}

.atfc-result-section.active {
    display: block;
    animation: atfc-fadeIn 0.5s ease;
}

.atfc-result-info {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(42, 167, 155, 0.1));
    border-radius: var(--border-radius);
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.atfc-download-btn {
    background: linear-gradient(135deg, var(--success-color), #2aa79b);
}

.atfc-download-btn:hover {
    background: linear-gradient(135deg, #2aa79b, var(--success-color));
}

/* Advanced Options */
.atfc-advanced-options {
    margin-top: 1.8rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-light);
    display: none;
}

.atfc-advanced-options.active {
    display: block;
}

.atfc-toggle-options {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
    width: auto;
}

.atfc-toggle-options:hover {
    color: var(--primary-dark);
    background: none;
    transform: none;
    box-shadow: none;
}

.atfc-option-group {
    margin-bottom: 1.2rem;
}

.atfc-option-group:last-child {
    margin-bottom: 0;
}

.atfc-option-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.7rem;
}

.atfc-option-label {
    min-width: 120px;
    font-weight: 500;
}

.atfc-range-input {
    flex: 1;
    height: 6px;
    background: var(--gray-light);
    border-radius: 3px;
    outline: none;
}

.atfc-range-input::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.atfc-range-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

/* Utility Classes */
.atfc-hidden {
    display: none;
}

.atfc-text-center {
    text-align: center;
}

.atfc-mt-1 {
    margin-top: 1rem;
}

.atfc-mt-2 {
    margin-top: 2rem;
}

.atfc-mb-1 {
    margin-bottom: 1rem;
}

.atfc-mb-2 {
    margin-bottom: 2rem;
}

/* Animations */
@keyframes atfc-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .atfc-converter-wrapper {
        padding: 10px;
    }
    
    .atfc-card {
        padding: 1.5rem;
    }
    
    .atfc-button-group {
        flex-direction: column;
    }
    
    .atfc-option-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .atfc-option-label {
        min-width: auto;
    }
}