/* Button Styles */
.btn-primary,
.btn-secondary,
.btn-record {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-record {
    background: #28a745;
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-record:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-record.recording {
    background: #dc3545;
    animation: pulse 1s infinite;
}

.btn-record.processing {
    background: #ffc107;
    color: #212529;
    cursor: not-allowed;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.definition-content {
    line-height: 1.6;
}

.definition-content > div {
    margin-bottom: 1rem;
}

.definition-content .translation {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.definition-content .pronunciation {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

.definition-content .example {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Audio Player Styles */
#audio-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.audio-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.audio-progress {
    width: 300px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.audio-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.1s ease;
}

/* Recording Indicator */
.recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.recording-dot {
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    animation: blink 1s infinite;
}

.recording-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.recording-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Status Messages */
.status-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Navigation Controls */
.navigation-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    gap: 1rem;
}

.navigation-controls .btn-secondary:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.navigation-controls .btn-secondary:disabled:hover {
    background: #e9ecef;
    transform: none;
}

/* Responsive Components */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .audio-progress {
        width: 200px;
    }
    
    .btn-record {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-actions .btn-primary,
    .result-actions .btn-secondary {
        width: 100%;
    }

    .navigation-controls {
        flex-direction: column;
        gap: 0.75rem;
    }

    .navigation-controls .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .audio-controls {
        flex-direction: column;
    }
    
    .audio-progress {
        width: 150px;
    }
}

/* Presentation Question Styles */
.presentation-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #28a745;
}

.question-category {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-danish {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0.8rem 0;
    font-weight: 600;
}

.question-english {
    font-size: 1rem;
    color: #6c757d;
    margin: 0.8rem 0;
}

.result-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 0.75rem;
    border-radius: 4px;
}