/*
 * Keyboard Tester Tool - Professional Neumorphic Styling
 * Black theme with heavy neumorphic shadows
 */

/* ===== PAGE LAYOUT ===== */
.keyboard-tester-page {
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 2rem 0;
}

/* ===== HERO SECTION ===== */
.keyboard-hero {
    position: relative;
    padding: 6rem 2rem 5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    background: #000000;
}

.keyboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(white 1px, transparent 1px);
    background-size: 100px 100px;
    background-position: 0 0;
    opacity: 0.03;
    pointer-events: none;
}

.keyboard-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}

.keyboard-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #f0f0f0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.keyboard-subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== MAIN CONTENT ===== */
.keyboard-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== INFO PANEL - NEUMORPHIC ===== */
.keyboard-info-panel {
    background: #1a1a1a;
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 
        -8px -8px 20px rgba(255, 255, 255, 0.05),
        8px 8px 20px rgba(0, 0, 0, 0.8);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 0.9rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-value {
    font-size: 1.3rem;
    color: #f0f0f0;
    font-weight: 700;
}

.layout-info-display {
    font-size: 1.1rem;
    color: #d0d0d0;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 
        -6px -6px 16px rgba(255, 255, 255, 0.05),
        6px 6px 16px rgba(0, 0, 0, 0.8);
}

.progress-label {
    font-size: 0.95rem;
    color: #e0e0e0;
    margin-bottom: 1rem;
    font-weight: 600;
}

.progress-bar {
    background: #0f0f0f;
    border-radius: 12px;
    height: 24px;
    overflow: hidden;
    box-shadow: 
        inset -4px -4px 10px rgba(255, 255, 255, 0.05),
        inset 4px 4px 10px rgba(0, 0, 0, 0.7);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #66ff00 0%, #00ff88 100%);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 
        0 0 10px rgba(102, 255, 0, 0.6),
        inset -2px -2px 5px rgba(0, 0, 0, 0.3),
        inset 2px 2px 5px rgba(255, 255, 255, 0.1);
}

.progress-text {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-weight: 700;
    color: #f0f0f0;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ===== KEYBOARD CONTAINER ===== */
.keyboard-container {
    background: #1a1a1a;
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        -12px -12px 30px rgba(255, 255, 255, 0.05),
        12px 12px 30px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 1200px;
}

/* ===== KEYBOARD ROWS ===== */
.keyboard-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.keyboard-row.function-row {
    margin-bottom: 1rem;
    gap: 0.3rem;
}

.keyboard-row.spacebar-row {
    justify-content: center;
    gap: 0.5rem;
}

.keyboard-row.nav-row {
    gap: 0.3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== KEYBOARD KEYS ===== */
.keyboard-key {
    background: #252525;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    min-width: 44px;
    min-height: 44px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        -4px -4px 10px rgba(255, 255, 255, 0.05),
        4px 4px 10px rgba(0, 0, 0, 0.7),
        inset -1px -1px 3px rgba(255, 255, 255, 0.05),
        inset 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.keyboard-key:hover:not(.pressed) {
    background: #303030;
    box-shadow: 
        -4px -4px 12px rgba(255, 255, 255, 0.06),
        4px 4px 12px rgba(0, 0, 0, 0.75),
        inset -1px -1px 3px rgba(255, 255, 255, 0.06),
        inset 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.keyboard-key.pressed {
    background: #66ff00;
    color: #000000;
    font-weight: 700;
    box-shadow: 
        inset -3px -3px 8px rgba(0, 0, 0, 0.4),
        inset 3px 3px 8px rgba(255, 255, 255, 0.2),
        0 0 15px rgba(102, 255, 0, 0.6);
    transform: scale(0.95);
}

.keyboard-key.tested {
    background: #1a3a1a;
    box-shadow: 
        -4px -4px 10px rgba(255, 255, 255, 0.05),
        4px 4px 10px rgba(0, 0, 0, 0.7),
        inset -1px -1px 3px rgba(102, 255, 0, 0.2),
        inset 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.keyboard-key.tested:not(.pressed) {
    color: #90ee90;
    border-left: 2px solid rgba(102, 255, 0, 0.4);
}

/* Key size variations */
.keyboard-key.key-large {
    flex: 1.5;
    min-width: 60px;
}

.keyboard-key.key-wide {
    flex: 6;
    min-width: 200px;
}

/* ===== LAST KEY DISPLAY ===== */
.last-key-section {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        -6px -6px 16px rgba(255, 255, 255, 0.05),
        6px 6px 16px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.last-key-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #66ff00;
    transition: all 0.3s ease;
}

.last-key-display.pulse {
    animation: pulse-key 0.3s ease;
}

@keyframes pulse-key {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: #90ff00; }
    100% { transform: scale(1); }
}

/* ===== COMPLETION MESSAGE ===== */
.completion-message {
    background: #1a3a1a;
    border: 2px solid #66ff00;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    display: none;
    animation: slideIn 0.4s ease;
    box-shadow: 
        -6px -6px 16px rgba(255, 255, 255, 0.05),
        6px 6px 16px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(102, 255, 0, 0.3);
}

.completion-message.show {
    display: block;
}

.completion-message h3 {
    font-size: 1.5rem;
    color: #90ff00;
    margin: 0 0 0.5rem 0;
}

.completion-message p {
    color: #b0d0b0;
    margin: 0;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CONTROL BUTTONS ===== */
.keyboard-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.keyboard-button {
    background: #1a1a1a;
    border: none;
    border-radius: 14px;
    padding: 1rem 1.5rem;
    color: #d0d0d0;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        -4px -4px 12px rgba(255, 255, 255, 0.05),
        4px 4px 12px rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.keyboard-button:hover {
    transform: translateY(-2px);
    background: #252525;
    box-shadow: 
        -6px -6px 16px rgba(255, 255, 255, 0.06),
        6px 6px 16px rgba(0, 0, 0, 0.85);
}

.keyboard-button:active {
    transform: translateY(0);
    box-shadow: 
        inset -2px -2px 5px rgba(255, 255, 255, 0.03),
        inset 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.keyboard-button.reset-btn {
    background: #3a2a2a;
}

.keyboard-button.reset-btn:hover {
    background: #4a3a3a;
}

.keyboard-button.sound-btn {
    background: #2a3a2a;
}

.keyboard-button.sound-btn.sound-enabled {
    background: #1a4a1a;
    color: #90ff00;
    box-shadow: 
        -4px -4px 12px rgba(255, 255, 255, 0.05),
        4px 4px 12px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(102, 255, 0, 0.3);
}

.keyboard-button.export-btn {
    background: #2a3a3a;
}

.keyboard-button.export-btn:hover {
    background: #3a4a4a;
}

/* ===== INSTRUCTIONS PANEL ===== */
.keyboard-instructions {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 
        -6px -6px 16px rgba(255, 255, 255, 0.05),
        6px 6px 16px rgba(0, 0, 0, 0.8);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.instructions-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f0f0f0;
    margin: 0 0 1rem 0;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions-list li {
    color: #c0c0c0;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.instructions-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #66ff00;
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .keyboard-info-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .keyboard-container {
        padding: 1.5rem;
    }

    .keyboard-key {
        min-width: 40px;
        min-height: 40px;
        padding: 0.6rem 0.7rem;
        font-size: 0.8rem;
    }

    .keyboard-key.key-large {
        min-width: 50px;
    }

    .keyboard-key.key-wide {
        min-width: 150px;
    }

    .keyboard-controls {
        gap: 0.75rem;
    }

    .keyboard-button {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .keyboard-hero {
        padding: 4rem 1.5rem 3rem;
        min-height: 40vh;
    }

    .keyboard-title {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .keyboard-section {
        padding: 2rem 1rem;
    }

    .keyboard-container {
        padding: 1rem;
        gap: 0.3rem;
    }

    .keyboard-row.function-row {
        margin-bottom: 0.5rem;
    }

    .keyboard-row.nav-row {
        padding-top: 0.5rem;
    }

    .keyboard-key {
        min-width: 36px;
        min-height: 36px;
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }

    .keyboard-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .keyboard-button {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }

    .keyboard-instructions {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .keyboard-hero {
        padding: 2.5rem 1rem 2rem;
        min-height: 35vh;
    }

    .keyboard-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .keyboard-subtitle {
        font-size: 0.95rem;
    }

    .keyboard-container {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
        gap: 0.25rem;
    }

    .keyboard-key {
        min-width: 32px;
        min-height: 32px;
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }

    .keyboard-key.key-large {
        min-width: 44px;
        flex: 1.2;
    }

    .keyboard-key.key-wide {
        min-width: 120px;
        flex: 4;
    }

    .keyboard-info-panel {
        padding: 1rem;
        gap: 0.8rem;
    }

    .info-value {
        font-size: 1.1rem;
    }

    .progress-container {
        padding: 1rem;
    }

    .last-key-section {
        padding: 1rem;
    }

    .last-key-display {
        font-size: 1.2rem;
    }
}
