/* Audio Recorder - Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    margin-bottom: 0.5rem;
    color: #333;
}

.login-box .subtitle {
    color: #666;
    margin-bottom: 1.5rem;
}

.login-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    text-align: left;
    font-size: 0.9rem;
    color: #666;
}

.login-info code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 1.2em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5a6fd6;
}

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

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Navbar */
.navbar {
    background: #667eea;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Recorder Card */
.recorder-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.recorder-card h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

/* Recorder Status */
.recorder-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.status-text {
    font-weight: 500;
    color: #28a745;
}

.status-text.recording {
    color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.timer {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* Visualizer */
.visualizer-container {
    background: #141414;
    border-radius: 8px;
    height: 120px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

#visualizer {
    width: 100%;
    height: 100%;
}

/* Recorder Controls */
.recorder-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-record,
.btn-stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-record {
    background: #dc3545;
    color: white;
}

.btn-record:hover:not(:disabled) {
    background: #c82333;
    transform: scale(1.05);
}

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

.btn-stop:hover:not(:disabled) {
    background: #5a6268;
}

.record-icon,
.stop-icon {
    font-size: 2rem;
}

/* Preview Section */
.preview-section {
    border-top: 2px solid #e0e0e0;
    padding-top: 1.5rem;
}

.preview-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.preview-section audio {
    width: 100%;
    margin-bottom: 1rem;
}

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

.preview-actions .btn {
    flex: 1;
}

/* Recordings List */
.recordings-list h3 {
    margin-bottom: 1rem;
    color: #333;
}

.no-recordings {
    text-align: center;
    color: #666;
    padding: 2rem;
    background: white;
    border-radius: 8px;
}

/* Recording Item */
.recording-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recording-info {
    flex: 1;
}

.recording-date {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.recording-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.recording-comment {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.recording-actions {
    display: flex;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .recorder-card {
        padding: 1.5rem;
    }
    
    .btn-record,
    .btn-stop {
        padding: 1rem 1.5rem;
    }
    
    .record-icon,
    .stop-icon {
        font-size: 1.5rem;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .recording-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .recording-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* User Badge */
.user-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.user-badge.admin {
    background: #dc3545;
    color: white;
}

.user-badge.user {
    background: #28a745;
    color: white;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}
