* {
    font-weight: normal;
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    font-family: "Century Gothic", Arial, sans-serif;
    background-color: #0c0c1d;
    color: #fff;
    background-image:
            linear-gradient(rgba(18, 16, 45, 0.8) 1px, transparent 1px),
            linear-gradient(90deg, rgba(18, 16, 45, 0.8) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
    overflow-x: hidden;
}

/* Login Form */
#login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

form {
    background: rgba(20, 20, 40, 0.8);
    color: #fff;
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(128, 0, 255, 0.4);
    box-shadow: 0 0 30px rgba(128, 0, 255, 0.3), inset 0 0 30px rgba(128, 0, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.logo {
    width: 100px;
}

/* Avatar selector styles */
.avatar-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.avatar-preview {
    width: 100px;
    height: 80px;
    border-radius: 50%;
    background: rgba(30, 30, 60, 0.8);
    border: 2px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    padding: 5px;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-preview:hover {
    transform: scale(1.05);
    border-color: #0ff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.avatar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    background: rgba(20, 20, 40, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.avatar-option {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(30, 30, 60, 0.8);
    border: 2px solid rgba(128, 0, 255, 0.4);
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-option:hover {
    transform: scale(1.1);
    border-color: #0ff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            to bottom right,
            rgba(255, 0, 255, 0.1),
            rgba(0, 255, 255, 0.1),
            rgba(128, 0, 255, 0.1)
    );
    transform: rotate(30deg);
    z-index: -1;
    pointer-events: none;
}

form input[type="text"] {
    width: 100%;
    font-size: 1.25em;
    padding: 12px;
    margin-bottom: 15px;
    background: rgba(30, 30, 60, 0.8);
    color: #fff;
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2), inset 0 0 10px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
    outline: none;
}

form input[type="text"]:focus {
    border-color: #0ff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4), inset 0 0 10px rgba(0, 255, 255, 0.2);
}

form input[type="submit"] {
    font-size: 1.25em;
    padding: 12px 24px;
    background: linear-gradient(45deg, #f0f, #80f);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

form input[type="submit"]:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.7);
}

form input[type="submit"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            to bottom right,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0.3),
            rgba(255, 255, 255, 0)
    );
    transform: rotate(30deg);
    transition: all 0.5s ease;
    z-index: 1;
    opacity: 0;
}

form input[type="submit"]:hover::before {
    animation: shine 1.5s infinite;
    opacity: 1;
}

@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }
    20% {
        left: 100%;
        opacity: 0.6;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}



/* Username Display */
.header {
    background: rgba(0, 0, 0, 0.7);
    color: #0ff;
    text-align: center;
    padding: 15px;
    font-size: 1.5em;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 5px #0ff, 0 0 10px #0ff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#username {
    -webkit-touch-callout:none;
    -webkit-user-select:none;
    -khtml-user-select:none;
    -moz-user-select:none;
    -ms-user-select:none;
    user-select:none;
    -webkit-tap-highlight-color:rgba(0,0,0,0);
}


.floating-points {
    position: absolute;
    left: 50%;
    top: 20px;
    color: #4CAF50;
    font-weight: bold;
    font-size: 18px;
    z-index: 1000;
    opacity: 1;
}

.user-score {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.9em;
    color: #f0f;
    text-shadow: 0 0 5px #f0f, 0 0 10px #f0f;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 10px;
    border-radius: 15px;
    border: 1px solid rgba(255, 0, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
    vertical-align: middle;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.logo-container {
    display: inline-block;
    vertical-align: middle;
}

/* Suggestions */
#question-title {
    display: block;
    margin: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 200, 255, 0.2));
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

#suggestions {
    padding: 20px;
    text-align: center;
}

#suggestions ul {
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

#suggestions li {
    margin: 15px 0;
    display: block;
    background: linear-gradient(90deg, rgba(20, 20, 40, 0.8), rgba(30, 30, 60, 0.8));
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 24px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#suggestions li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
    rgba(0, 255, 255, 0),
    rgba(0, 255, 255, 0.1),
    rgba(0, 255, 255, 0)
    );
    transition: all 0.5s ease;
}

#suggestions li:hover {
    background: linear-gradient(90deg, rgba(30, 30, 60, 0.8), rgba(40, 40, 80, 0.8));
    transform: translateX(5px);
    box-shadow: -5px 0 15px rgba(0, 255, 255, 0.3);
}

#suggestions li:hover::before {
    left: 100%;
}

.wait {
    color: #0ff;
    font-size: 28px;
    text-shadow: 0 0 10px #0ff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Answer Styles */
.right {
    font-size: 72px;
    color: #0f0;
    text-shadow: 0 0 10px #0f0, 0 0 20px #0f0;
}

.wrong {
    font-size: 72px;
    color: #f00;
    text-shadow: 0 0 10px #f00, 0 0 20px #f00;
}

.other-right {
    font-size: 36px;
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
    letter-spacing: 1px;
}

.correct-answer {
    font-size: 24px;
    margin-top: 20px;
    color: #fff;
    text-shadow: 0 0 5px #fff;
    letter-spacing: 1px;
}

.correct-answer .right {
    font-size: 28px;
}


/* Layer
******************************************************/
#layer {
    position: absolute;
    left: 0;
    right: 0;
    top: 200px;
    text-align: center;
    z-index: 3;

    -moz-transform: skew(0deg, -7deg);
    -webkit-transform: skew(0deg, -7deg);
    -o-transform: skew(0deg, -7deg);
    -ms-transform: skew(0deg, -7deg);
    transform: skew(0deg, -7deg);
}

/* Hint, answer
******************************************************/
#hint,
#answer,
#winner {
    display: none;
    padding: 25px;
    font-size: 72px;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.9), rgba(128, 0, 255, 0.9));
    color: #fff;
    -moz-animation-duration: 0.5s;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.6);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

#hint::before,
#answer::before,
#winner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0)
    );
    animation: shine-layer 2s infinite;
}

@keyframes shine-layer {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

#answer.fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

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

/* Additional global styles for retrofuturistic look */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 20, 40, 0.8);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #0ff, #f0f);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #0ff, #80f);
}

::selection {
    background: rgba(255, 0, 255, 0.3);
    color: #fff;
    text-shadow: 0 0 5px #f0f;
}

/* Song Progress */
.song-progress {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #0ff;
    padding: 6px 12px;
    font-size: 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 5px #0ff, 0 0 10px #0ff;
    z-index: 10;
    letter-spacing: 1px;
    font-weight: bold;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.song-progress:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Pause Overlay */
.pause-overlay {
    display: none; /* Hidden by default, shown when game is paused */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.pause-message {
    font-size: 72px;
    color: #f0f;
    text-shadow: 0 0 20px #f0f, 0 0 40px #f0f;
    letter-spacing: 5px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

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

/* Final Ranking Styles */
#final-ranking {
    display: none; /* Hidden by default, shown at the end of the round */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 12, 29, 0.95);
    color: #fff;
    z-index: 1000;
    padding: 20px;
    text-align: center;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

#final-ranking h2 {
    color: #f0f;
    text-shadow: 0 0 10px #f0f, 0 0 20px #f0f;
    font-size: 36px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.ranking-list {
    max-width: 90%;
    margin: 0 auto 30px;
    background: rgba(20, 20, 40, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 30px rgba(0, 255, 255, 0.1);
    padding: 15px;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, rgba(30, 30, 60, 0.8), rgba(40, 40, 80, 0.8));
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.ranking-position {
    font-size: 20px;
    font-weight: bold;
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
    margin-right: 10px;
    min-width: 25px;
}

.ranking-username {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 20px;
    text-align: left;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.ranking-score {
    font-size: 24px;
    font-weight: bold;
    color: #f0f;
    text-shadow: 0 0 5px #f0f;
    margin-left: 10px;
}

/* Highlight current user in rankings */
.ranking-item.current-user {
    background: linear-gradient(90deg, rgba(40, 40, 80, 0.9), rgba(60, 60, 120, 0.9));
    border: 1px solid rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: scale(1.05);
}

.ranking-item.current-user .ranking-username {
    color: #0ff;
    text-shadow: 0 0 8px #0ff;
    font-weight: bold;
}

.restart-message {
    margin-top: 30px;
    font-size: 20px;
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 30px;
    display: inline-block;
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.restart-message .seconds {
    font-size: 24px;
    font-weight: bold;
    color: #f0f;
    text-shadow: 0 0 5px #f0f;
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}
