/* Audio Trimmer Styles */

.audio-trimmer {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.5rem;
}

.upload-area p {
    margin: 0.25rem 0;
    color: #666;
}

.file-info {
    font-size: 0.9rem;
    color: #888;
}

/* Trimmer Interface */
.trimmer-interface {
    display: grid;
    gap: 2rem;
}

/* Audio Info */
.audio-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.audio-info h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.info-item .label {
    font-weight: 600;
    color: #555;
}

/* Audio Player */
.audio-player {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.audio-player h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

/* Waveform Container */
.waveform-container {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.waveform-container h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.waveform {
    width: 100%;
    height: 120px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.waveform canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.waveform .selection-overlay {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(0, 123, 255, 0.2);
    border: 2px solid #007bff;
    pointer-events: none;
    z-index: 2;
}

.waveform .time-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: #dc3545;
    pointer-events: none;
    z-index: 3;
}

/* Trim Controls */
.trim-controls {
    display: grid;
    gap: 1rem;
}

.time-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
}

.input-group input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 80px;
}

.input-group span {
    color: #666;
    font-size: 0.9rem;
}

.control-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Trim Options */
.trim-options {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.trim-options h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 600;
    color: #555;
}

.option-group select,
.option-group input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.option-group span {
    color: #666;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Progress Area */
.progress-area {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.progress-area h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

#progress-text {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Result Area */
.result-area {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.result-area h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.result-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.result-info span {
    color: #666;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-secondary:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Message Toast */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.message-toast.show {
    transform: translateX(0);
}

.message-toast.success {
    background: #28a745;
}

.message-toast.error {
    background: #dc3545;
}

.message-toast.info {
    background: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .audio-trimmer {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .info-grid,
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .time-inputs {
        grid-template-columns: 1fr;
    }
    
    .control-buttons,
    .result-actions {
        flex-direction: column;
    }
    
    .result-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 1.5rem 0.5rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .upload-area h3 {
        font-size: 1.2rem;
    }
    
    .waveform {
        height: 80px;
    }
    
    .input-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .input-group label {
        min-width: auto;
    }
}
