/* Common styles for all expert pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #1a1a1a;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    line-height: 1.6;
    color: #fff;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(0, 188, 212, 0.15) 1px, transparent 1px),
        linear-gradient(rgba(0, 188, 212, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 25px 25px, 25px 25px;
    animation: gridMove 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(26, 26, 26, 0.9) 100%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1400px;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 188, 212, 0.15);
    text-align: center;
    border: 1px solid rgba(0, 188, 212, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, rgba(0, 188, 212, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0, 188, 212, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0, 188, 212, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0, 188, 212, 0.05) 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    z-index: -1;
    animation: containerGridMove 20s linear infinite;
}

@keyframes containerGridMove {
    0% { background-position: 0 0, 0 20px, 20px -20px, -20px 0px; }
    100% { background-position: 40px 40px, 40px 60px, 60px 20px, 20px 40px; }
}

h1 {
    color: #00bcd4;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
}

.practice-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.word-display {
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
    min-height: 3rem;
}

.input-area {
    width: 100%;
    max-width: 500px;
}

#word-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(0, 188, 212, 0.2);
    border-radius: 8px;
    color: #fff;
    text-align: center;
}

#word-input:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.2);
}

.stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.stat {
    background: rgba(0, 188, 212, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    color: #fff;
}

.stat span:first-child {
    color: #00bcd4;
    margin-right: 0.5rem;
}

.keyboard {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.key {
    width: 50px;
    height: 50px;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 187, 212, 0.344);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 188, 212, 0.1);
    color: #fff;
}

.key:hover {
    background: rgba(0, 188, 212, 0.1);
    border-color: rgba(0, 188, 212, 0.3);
}

.key.active {
    background: #00d420;
    color: #a10e0e;
    text-shadow: 0 0 5px red;
    transform: translateY(2px);
    box-shadow: 0 0 25px rgba(0, 187, 212, 0.724);
}

.key.space {
    width: 300px;
}

.back-button {
    position: fixed;
    bottom: 20px;
    right: 30px;
    padding: 10px 20px;
    background: #00bcd4;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 188, 212, 0.2);
}

.back-button:hover {
    background: rgba(0, 188, 212, 0.8);
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.next-button {
    position: fixed;
    bottom: 20px;
    right: 140px;
    padding: 10px 20px;
    background: #00bcd4;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 188, 212, 0.2);
}

.next-button:hover {
    background: rgba(0, 188, 212, 0.8);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat {
        width: 100%;
        text-align: center;
    }

    .key {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .key.space {
        width: 200px;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .word-display {
        font-size: 1.5rem;
    }

    #word-input {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .key {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .key.space {
        width: 150px;
    }
}
