/**
 * Voice Range Test - Simple Styles
 * Version: 1.0.0
 */

/* ================================
   VARIABLES
   ================================ */

:root {
    --vrt-primary: #6366f1;
    --vrt-primary-dark: #4f46e5;
    --vrt-success: #10b981;
    --vrt-error: #ef4444;
    --vrt-warning: #f59e0b;
    
    --vrt-bg: #ffffff;
    --vrt-bg-alt: #f9fafb;
    --vrt-text: #111827;
    --vrt-text-light: #6b7280;
    --vrt-text-muted: #9ca3af;
    --vrt-border: #e5e7eb;
    
    --vrt-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --vrt-shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    --vrt-radius: 1rem;
    --vrt-radius-lg: 1.5rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --vrt-bg: #0f172a;
        --vrt-bg-alt: #1e293b;
        --vrt-text: #f1f5f9;
        --vrt-text-light: #cbd5e1;
        --vrt-text-muted: #94a3b8;
        --vrt-border: #334155;
    }
}

/* ================================
   BASE
   ================================ */

.vrt-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--vrt-text);
}

.vrt-container * {
    box-sizing: border-box;
}

/* ================================
   HERO
   ================================ */

.vrt-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.vrt-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, var(--vrt-primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vrt-subtitle {
    font-size: 1.25rem;
    color: var(--vrt-text-light);
    margin: 0 0 2rem 0;
}

.vrt-trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--vrt-text-muted);
}

/* ================================
   CARD
   ================================ */

.vrt-card {
    background: var(--vrt-bg);
    border-radius: var(--vrt-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--vrt-shadow-lg);
}

.vrt-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
}

/* ================================
   START SCREEN
   ================================ */

.vrt-start-content {
    text-align: center;
    padding: 3rem 1rem;
}

.vrt-mic-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.vrt-start-content h2 {
    font-size: 2rem;
    margin: 0 0 1rem 0;
}

.vrt-start-content p {
    font-size: 1.125rem;
    color: var(--vrt-text-light);
    margin-bottom: 2rem;
}

.vrt-privacy {
    font-size: 0.875rem !important;
    color: var(--vrt-text-muted) !important;
    margin-top: 1rem !important;
}

/* ================================
   BUTTONS
   ================================ */

.vrt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--vrt-shadow);
}

.vrt-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--vrt-shadow-lg);
}

.vrt-btn-primary {
    background: linear-gradient(135deg, var(--vrt-primary), #8b5cf6);
    color: white;
}

.vrt-btn-secondary {
    background: var(--vrt-bg-alt);
    color: var(--vrt-text);
    border: 2px solid var(--vrt-border);
}

.vrt-btn-success {
    background: var(--vrt-success);
    color: white;
}

.vrt-btn-large {
    font-size: 1.125rem;
    padding: 1rem 2rem;
}

/* ================================
   CURRENT NOTE
   ================================ */

.vrt-current-note {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.05));
    border-radius: var(--vrt-radius);
    margin-bottom: 2rem;
}

.vrt-note-name {
    font-size: 4rem;
    font-weight: 700;
    color: var(--vrt-primary);
    font-family: 'Courier New', monospace;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.vrt-note-freq {
    font-size: 1.25rem;
    color: var(--vrt-text-light);
    font-family: 'Courier New', monospace;
}

.vrt-pitch-meter {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 40px;
    margin: 1rem auto 0;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 35%, #10b981 50%, #f59e0b 65%, #ef4444 100%);
    border-radius: 20px;
}

.vrt-pitch-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: white;
    border: 4px solid #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16,185,129,0.5);
    transition: left 0.1s ease, border-color 0.2s;
}

/* ================================
   PIANO
   ================================ */

.vrt-piano-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--vrt-bg-alt);
    border-radius: var(--vrt-radius);
}

.vrt-piano {
    display: flex;
    gap: 2px;
    min-width: max-content;
}

.vrt-octave {
    position: relative;
    display: flex;
}

.vrt-key {
    cursor: pointer;
    transition: all 0.15s;
}

.vrt-key-white {
    width: 35px;
    height: 140px;
    background: white;
    border: 2px solid #ccc;
    border-radius: 0 0 4px 4px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
}

.vrt-key-black {
    position: absolute;
    width: 24px;
    height: 90px;
    background: linear-gradient(180deg, #2d3748, #1a202c);
    border: 1px solid #000;
    border-radius: 0 0 4px 4px;
    z-index: 2;
}

.vrt-key-black[data-note*="C#"] { left: 23px; }
.vrt-key-black[data-note*="D#"] { left: 60px; }
.vrt-key-black[data-note*="F#"] { left: 134px; }
.vrt-key-black[data-note*="G#"] { left: 171px; }
.vrt-key-black[data-note*="A#"] { left: 208px; }

.vrt-key-label {
    font-size: 0.75rem;
    color: var(--vrt-text-muted);
    font-weight: 600;
}

.vrt-key-white:hover {
    background: #f0f0f0;
}

.vrt-key-active {
    background: var(--vrt-success) !important;
    transform: scale(1.05);
}

.vrt-key-low {
    background: #3b82f6 !important;
}

.vrt-key-high {
    background: #ef4444 !important;
}

.vrt-key-range {
    background: rgba(99,102,241,0.2) !important;
}

/* ================================
   INSTRUCTIONS
   ================================ */

.vrt-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.vrt-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--vrt-bg-alt);
    border-radius: var(--vrt-radius);
}

.vrt-step-number {
    width: 40px;
    height: 40px;
    background: var(--vrt-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.vrt-step-text {
    flex: 1;
    font-size: 0.875rem;
}

/* ================================
   CONTROLS
   ================================ */

.vrt-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

/* ================================
   RECORDED NOTES
   ================================ */

.vrt-recorded {
    text-align: center;
    margin-top: 2rem;
}

.vrt-recorded-notes {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.vrt-recorded-item {
    font-size: 1.125rem;
}

.vrt-recorded-item span {
    color: var(--vrt-text-light);
}

.vrt-recorded-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--vrt-primary);
    font-family: 'Courier New', monospace;
    margin-top: 0.25rem;
}

/* ================================
   RESULTS
   ================================ */

.vrt-result-hero {
    text-align: center;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
}

.vrt-voice-badge {
    display: inline-block;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--vrt-primary), #8b5cf6);
    border-radius: var(--vrt-radius);
    margin-bottom: 1rem;
}

.vrt-voice-type {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

.vrt-voice-range-text {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
}

.vrt-voice-description {
    font-size: 1.125rem;
    color: var(--vrt-text-light);
    line-height: 1.6;
    margin: 0;
}

/* ================================
   STATS
   ================================ */

.vrt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.vrt-stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--vrt-bg-alt);
    border-radius: var(--vrt-radius);
}

.vrt-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vrt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.vrt-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--vrt-primary);
    font-family: 'Courier New', monospace;
}

/* ================================
   SINGERS
   ================================ */

.vrt-singers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.vrt-singer-card {
    position: relative;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--vrt-bg-alt);
    border: 2px solid var(--vrt-border);
    border-radius: var(--vrt-radius);
    transition: all 0.2s;
}

.vrt-singer-card:hover {
    border-color: var(--vrt-primary);
    transform: translateY(-2px);
}

.vrt-exact-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--vrt-success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.vrt-singer-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--vrt-primary), #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 0.75rem;
}

.vrt-singer-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.vrt-singer-range {
    font-family: 'Courier New', monospace;
    color: var(--vrt-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.vrt-singer-type {
    font-size: 0.875rem;
    color: var(--vrt-text-muted);
}

/* ================================
   SONGS
   ================================ */

.vrt-songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.vrt-song-card {
    padding: 1.25rem;
    background: var(--vrt-bg-alt);
    border: 2px solid var(--vrt-border);
    border-radius: var(--vrt-radius);
    transition: all 0.2s;
}

.vrt-song-card:hover {
    border-color: var(--vrt-primary);
    transform: translateY(-2px);
}

.vrt-song-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.vrt-song-artist {
    font-size: 0.875rem;
    color: var(--vrt-text-light);
    margin-bottom: 1rem;
}

.vrt-song-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vrt-song-range {
    font-family: 'Courier New', monospace;
    color: var(--vrt-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.vrt-song-difficulty {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}

.vrt-diff-easy {
    background: #d1fae5;
    color: #065f46;
}

.vrt-diff-medium {
    background: #fef3c7;
    color: #92400e;
}

.vrt-diff-hard {
    background: #fee2e2;
    color: #991b1b;
}

.vrt-no-matches {
    text-align: center;
    padding: 3rem;
    color: var(--vrt-text-muted);
    font-size: 1.125rem;
}

/* ================================
   ACTIONS
   ================================ */

.vrt-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ================================
   SHARE MODAL
   ================================ */

.vrt-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;
    padding: 1rem;
}

.vrt-modal-content {
    background: var(--vrt-bg);
    border-radius: var(--vrt-radius-lg);
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    position: relative;
    box-shadow: var(--vrt-shadow-lg);
}

.vrt-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--vrt-bg-alt);
    color: var(--vrt-text);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}

.vrt-modal-close:hover {
    background: var(--vrt-error);
    color: white;
}

.vrt-modal-content h3 {
    margin: 0 0 1.5rem 0;
}

.vrt-share-preview {
    margin: 1.5rem 0;
}

.vrt-share-card {
    background: linear-gradient(135deg, var(--vrt-primary), #8b5cf6);
    color: white;
    padding: 2rem;
    border-radius: var(--vrt-radius);
    text-align: center;
}

.vrt-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.vrt-share-header h4 {
    margin: 0;
    font-size: 1.125rem;
}

.vrt-share-voice {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.vrt-share-range {
    font-size: 1.25rem;
    font-family: 'Courier New', monospace;
}

.vrt-share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.vrt-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--vrt-bg-alt);
    border: 2px solid var(--vrt-border);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--vrt-text);
    transition: all 0.2s;
}

.vrt-share-btn:hover {
    border-color: var(--vrt-primary);
    transform: translateY(-2px);
}

/* ================================
   TOAST
   ================================ */

.vrt-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vrt-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--vrt-shadow-lg);
    border-left: 4px solid;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s;
}

.vrt-toast.vrt-show {
    opacity: 1;
    transform: translateX(0);
}

.vrt-toast-success { border-color: var(--vrt-success); }
.vrt-toast-error { border-color: var(--vrt-error); }
.vrt-toast-info { border-color: var(--vrt-primary); }
.vrt-toast-warning { border-color: var(--vrt-warning); }

.vrt-toast-icon {
    font-size: 1.25rem;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .vrt-hero h1 {
        font-size: 2rem;
    }
    
    .vrt-card {
        padding: 1.5rem 1rem;
    }
    
    .vrt-note-name {
        font-size: 3rem;
    }
    
    .vrt-key-white {
        width: 28px;
        height: 110px;
    }
    
    .vrt-key-black {
        width: 20px;
        height: 70px;
    }
    
    .vrt-controls {
        flex-direction: column;
    }
    
    .vrt-btn {
        width: 100%;
    }
    
    .vrt-singers-grid,
    .vrt-songs-grid {
        grid-template-columns: 1fr;
    }
    
    .vrt-toast-container {
        left: 1rem;
        right: 1rem;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */

*:focus-visible {
    outline: 3px solid var(--vrt-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
