@font-face {
    font-family: 'Zyzol';
    src: url('../fonts/Zyzol.otf') format('opentype');
}

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

body {
    font-family: 'Zyzol', sans-serif;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    color: white;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(46, 145, 238, 0.2);
    border-bottom: 2px solid rgba(46, 145, 238, 0.5);
    backdrop-filter: blur(5px);
}

header h1 {
    font-size: 2.5em;
    text-shadow: 0 0 10px rgba(46, 145, 238, 0.5);
}

.back-button {
    padding: 10px 20px;
    background: rgba(46, 145, 238, 0.3);
    border: 2px solid rgba(46, 145, 238, 0.5);
    border-radius: 5px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(46, 145, 238, 0.5);
    transform: translateY(-2px);
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.8;
}

.stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
}

/* Sections */
.section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(46, 145, 238, 0.5);
}

.hidden {
    display: none !important;
}

/* Search Section */
#search-section {
    align-items: center;
    justify-content: center;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 800px;
    width: 100%;
}

#song-search {
    flex: 1;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(46, 145, 238, 0.5);
    border-radius: 5px;
    color: white;
    font-family: 'Zyzol', sans-serif;
    font-size: 1.1em;
}

#song-search:focus {
    outline: none;
    border-color: rgba(46, 145, 238, 1);
    box-shadow: 0 0 10px rgba(46, 145, 238, 0.5);
}

#search-button,
#submit-button {
    padding: 15px 30px;
    background: rgba(46, 145, 238, 0.3);
    border: 2px solid rgba(46, 145, 238, 0.5);
    border-radius: 5px;
    color: white;
    font-family: 'Zyzol', sans-serif;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

#search-button:hover,
#submit-button:hover {
    background: rgba(46, 145, 238, 0.5);
    transform: translateY(-2px);
}

.secondary-button {
    padding: 10px 20px;
    background: rgba(100, 100, 100, 0.3);
    border: 2px solid rgba(150, 150, 150, 0.5);
    border-radius: 5px;
    color: white;
    font-family: 'Zyzol', sans-serif;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    background: rgba(100, 100, 100, 0.5);
    transform: translateY(-2px);
}

/* Search Results */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(46, 145, 238, 0.3);
    border-radius: 5px;
    backdrop-filter: blur(5px);
    max-width: 800px;
    width: 100%;
}

.search-result {
    padding: 15px;
    border-bottom: 1px solid rgba(46, 145, 238, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result:hover {
    background: rgba(46, 145, 238, 0.2);
}

.search-result img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-size: 1.1em;
    font-weight: bold;
}

.search-result-artist {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid rgba(46, 145, 238, 0.2);
    border-top: 4px solid rgba(46, 145, 238, 1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Game Section */
.game-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

#album-artwork {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    border: 2px solid rgba(46, 145, 238, 0.5);
    box-shadow: 0 0 20px rgba(46, 145, 238, 0.3);
}

.song-info {
    flex: 1;
}

#song-title {
    font-size: 2em;
    margin-bottom: 10px;
}

#song-artist {
    font-size: 1.2em;
    opacity: 0.8;
    margin-bottom: 15px;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

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

.stat-item .stat-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
}

.stat-item .stat-value.correct {
    color: #4ade80;
}

.stat-item .stat-value.wrong {
    color: #f87171;
}

.stat-item .stat-value.hint {
    color: #fbbf24;
}

/* Lyrics Container */
.lyrics-container {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(46, 145, 238, 0.3);
    border-radius: 5px;
    padding: 30px;
    padding-bottom: 20px;
    flex: 1;
    overflow-y: auto;
    line-height: 2;
    font-size: 1.1em;
}

.lyrics-line {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.word {
    display: inline-block;
    padding: 5px 10px;
    background: rgba(46, 145, 238, 0.2);
    border: 2px solid rgba(46, 145, 238, 0.3);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.word.hidden-word {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(100, 100, 100, 0.3);
    color: transparent;
    user-select: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.word.hidden-word:hover {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.5);
    transform: scale(1.05);
}

.word.revealed {
    animation: reveal 0.5s ease;
    background: rgba(46, 145, 238, 0.4);
    border-color: rgba(46, 145, 238, 0.7);
}

.word.hint-reveal {
    animation: hintReveal 0.5s ease;
    background: rgba(251, 191, 36, 0.4);
    border-color: rgba(251, 191, 36, 0.7);
}

@keyframes reveal {
    0% {
        transform: scale(1);
        background: rgba(74, 222, 128, 0.6);
        border-color: rgba(74, 222, 128, 1);
    }
    50% {
        transform: scale(1.2);
        background: rgba(74, 222, 128, 0.8);
        border-color: rgba(74, 222, 128, 1);
    }
    100% {
        transform: scale(1);
        background: rgba(46, 145, 238, 0.4);
        border-color: rgba(46, 145, 238, 0.7);
    }
}

@keyframes hintReveal {
    0% {
        transform: scale(1);
        background: rgba(251, 191, 36, 0.6);
        border-color: rgba(251, 191, 36, 1);
    }
    50% {
        transform: scale(1.2);
        background: rgba(251, 191, 36, 0.8);
        border-color: rgba(251, 191, 36, 1);
    }
    100% {
        transform: scale(1);
        background: rgba(251, 191, 36, 0.4);
        border-color: rgba(251, 191, 36, 0.7);
    }
}

/* Input Section */
.input-section {
    display: flex;
    gap: 10px;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.9);
    border-top: 2px solid rgba(46, 145, 238, 0.5);
    backdrop-filter: blur(10px);
    position: sticky;
    bottom: 0;
    z-index: 50;
}

#word-input {
    flex: 1;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(46, 145, 238, 0.5);
    border-radius: 5px;
    color: white;
    font-family: 'Zyzol', sans-serif;
    font-size: 1.1em;
}

#word-input:focus {
    outline: none;
    border-color: rgba(46, 145, 238, 1);
    box-shadow: 0 0 10px rgba(46, 145, 238, 0.5);
}

/* Feedback */
.feedback {
    padding: 15px 30px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1em;
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    min-width: 300px;
    opacity: 0;
    pointer-events: none;
}

.feedback.correct {
    background: rgba(74, 222, 128, 0.3);
    border: 2px solid rgba(74, 222, 128, 0.7);
    color: #4ade80;
    animation: fadeInOut 2s ease forwards;
}

.feedback.wrong {
    background: rgba(248, 113, 113, 0.3);
    border: 2px solid rgba(248, 113, 113, 0.7);
    color: #f87171;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Wrong Words */
.wrong-words-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(248, 113, 113, 0.1);
    border: 2px solid rgba(248, 113, 113, 0.3);
    border-radius: 5px;
}

.wrong-words-section h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #f87171;
}

.wrong-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wrong-word {
    padding: 8px 15px;
    background: rgba(248, 113, 113, 0.2);
    border: 2px solid rgba(248, 113, 113, 0.5);
    border-radius: 3px;
    color: #f87171;
}

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

.modal-content {
    background: rgba(46, 145, 238, 0.2);
    border: 2px solid rgba(46, 145, 238, 0.5);
    border-radius: 10px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: modalAppear 0.5s ease;
}

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

.modal-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(46, 145, 238, 0.5);
}

.modal-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.final-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}

.final-stat {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(46, 145, 238, 0.2);
}

.final-stat:last-child {
    border-bottom: none;
}

.final-stat .label {
    opacity: 0.8;
}

.final-stat .value {
    font-weight: bold;
    font-size: 1.2em;
}

.primary-button {
    padding: 15px 40px;
    background: rgba(46, 145, 238, 0.3);
    border: 2px solid rgba(46, 145, 238, 0.5);
    border-radius: 5px;
    color: white;
    font-family: 'Zyzol', sans-serif;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-button:hover {
    background: rgba(46, 145, 238, 0.5);
    transform: translateY(-2px);
}

/* Scrollbar */
.lyrics-container::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 10px;
}

.lyrics-container::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.lyrics-container::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
    background: rgba(46, 145, 238, 0.5);
    border-radius: 5px;
}

.lyrics-container::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(46, 145, 238, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-section {
        flex-direction: column;
    }

    #submit-button,
    #give-up-button {
        width: 100%;
    }
}
