/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #F0F2F5;
    color: #2C3E50;
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #E0E0E0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    color: #4A90E2;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2C3E50;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Status Section */
.status-section {
    background: white;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #E0E0E0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.status {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2C3E50;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
    flex: 1;
}

.status i {
    font-size: 14px;
    color: #4A90E2;
}

.status.success {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border-color: #BBF7D0;
    color: #166534;
}

.status.success i {
    color: #16A34A;
}

.status.error {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border-color: #FECACA;
    color: #991B1B;
}

.status.error i {
    color: #DC2626;
}

.status.loading {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border-color: #BAE6FD;
    color: #0C4A6E;
}

.status.loading i {
    color: #0284C7;
}

/* Convert Section */
.convert-section {
    display: none; /* Hide this section since we moved the button */
}

/* File Section */
.file-section {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #E8ECF0;
    transition: box-shadow 0.3s ease;
}

.file-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.estimation-container {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

.estimation-container:hover {
    
}

.estimation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.estimation-header h3 {
    font-weight: 600;
    font-size: 16px;
    color: #1E293B;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.estimation-header h3::before {
    content: "⚙️";
    font-size: 16px;
}

.estimation {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border-radius: 6px;
    padding: 12px;
    min-height: 80px;
    border: 1px solid #BAE6FD;
    margin-bottom: 12px;
}

.estimation-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.estimation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(186, 230, 253, 0.3);
}

.estimation-item:last-child {
    border-bottom: none;
}

.estimation-label {
    font-weight: 600;
    color: #0C4A6E;
    font-size: 13px;
}

.estimation-value {
    font-weight: 700;
    color: #0369A1;
    font-size: 13px;
    background: rgba(59, 130, 246, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
}

.no-estimation {
    color: #64748B;
    font-style: italic;
    text-align: center;
    padding: 20px 12px;
    font-size: 13px;
}

/* File List Section */
.file-list-section {
    margin-bottom: 12px;
}

.file-list-label {
    display: block;
    font-weight: 600;
    color: #1E293B;
    font-size: 13px;
    margin-bottom: 6px;
}

.file-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 2px solid #E2E8F0;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 14px;
    padding-right: 32px;
}

.file-select:hover:not(:disabled) {
    border-color: #ccc;
    background: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-select:focus {
    outline: none;
    border-color: #BBF7D0;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    background: #FFFFFF;
}

.file-select:disabled {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    border-color: #CBD5E1;
    color: #94A3B8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.file-select option {
    padding: 14px 12px;
    font-size: 14px;
    background: #fff;
    height: 50px !important;
    color: #1E293B;
    border: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.file-select option:hover {
    background: #BBF7D0 !important;
    color: #0C4A6E;
}

.file-select option:checked {
    background: #BBF7D0;
    color: #000;
}

.file-select option:focus {
    background: #BBF7D0;
    color: #1E40AF;
}

/* Audio Player Section */
.audio-player-section {
    background: white;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #E0E0E0;
}

.audio-player-container h3 {
    font-weight: 600;
    font-size: 16px;
    color: #2C3E50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audio-player-container h3::before {
    content: "🎵";
    font-size: 16px;
}

.audio-player {
    background-color: #F8F9FA;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.now-playing {
    font-size: 14px;
    font-weight: 500;
    color: #34495E;
    text-align: center;
}

.timeline-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.time-display {
    font-size: 11px;
    color: #7F8C8D;
    min-width: 35px;
    text-align: center;
}

input[type="range"]#timelineSlider {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #DEE2E6;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

input[type="range"]#timelineSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #4A90E2;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

input[type="range"]#timelineSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #4A90E2;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

input[type="range"]#timelineSlider:hover::-webkit-slider-thumb {
    background: #357ABD;
}

input[type="range"]#timelineSlider:hover::-moz-range-thumb {
    background: #357ABD;
}

input[type="range"]#timelineSlider:disabled {
    cursor: not-allowed;
}

input[type="range"]#timelineSlider:disabled::-webkit-slider-thumb {
    background: #BDBDBD;
}

input[type="range"]#timelineSlider:disabled::-moz-range-thumb {
    background: #BDBDBD;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-control {
    background-color: transparent;
    border: none;
    color: #2C3E50;
    font-size: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-control:hover:not(:disabled) {
    background-color: #E9ECEF;
}

.btn-control:disabled {
    color: #BDBDBD;
    cursor: not-allowed;
}

.btn-control.btn-play {
    font-size: 20px;
    width: 48px;
    height: 48px;
    background-color: #4A90E2;
    color: white;
}

.btn-control.btn-play:hover:not(:disabled) {
    background-color: #357ABD;
}

.btn-control.btn-play:disabled {
    background-color: #CED4DA;
    color: #F8F9FA;
}

/* Output Section */
.output-section {
    background: white;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #E0E0E0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.output-header h3 {
    font-weight: 600;
    font-size: 16px;
    color: #2C3E50;
    margin: 0;
}

.output-container {
    flex: 1;
    display: flex;
}

#outputText {
    width: 100%;
    min-height: 250px;
    padding: 12px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: #F8F9FA;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #2C3E50;
    resize: vertical;
    flex: 1;
}

#outputText:focus {
    outline: none;
    background: #FFFFFF;
    box-shadow: 0 0 0 2px #4A90E2;
}

/* Footer */
.footer {
    padding: 12px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #E0E0E0;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.btn-full-width {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
}

.btn-compact {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: #4A90E2;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #357ABD;
}

.btn-success {
    background: #27AE60;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #229954;
}

.btn-info {
    background: #3498DB;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #2980B9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 20% auto;
    padding: 0;
    border-radius: 8px;
    width: 350px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid #E0E0E0;
}

.modal-header h3 {
    margin: 0;
    color: #2C3E50;
    font-size: 16px;
}

.modal-body {
    padding: 20px;
}

.progress-container {
    text-align: center;
}

.loading-spinner {
    margin-bottom: 16px;
}

.loading-spinner i {
    font-size: 32px;
    color: #4A90E2;
    animation: spin 1s linear infinite;
}

.progress-text {
    color: #2C3E50;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.time-remaining {
    color: #64748B;
    font-size: 12px;
    font-weight: 500;
    background: #F1F5F9;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #E2E8F0;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .logo-icon {
        font-size: 28px;
    }
    
    .status-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .file-section {
        padding: 12px;
    }
    
    .estimation-container {
        padding: 12px;
    }
    
    .footer {
        padding: 10px;
    }
    
    .status {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .btn {
        min-width: 100px;
        font-size: 12px;
    }
    
    .btn-compact {
        padding: 5px 10px;
        font-size: 11px;
    }
} 