body {
    font-family: rubik, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1em 0;
    background-image: url('images/background.png');
    background-attachment: fixed;
    overflow-x: hidden;
    animation: move-background 20s linear infinite;
    box-sizing: border-box;
}

@keyframes move-background {
    0% { background-position: 0 0; }
    100% { background-position: -255px 255px; }
}

#game-container {
    background-color: #0471D9;
    padding: 1.5em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
    border: 10px solid #FBD913;
    position: relative;
    margin: 0 10px;
    z-index: 2;
}

.screen { display: none; }
.screen.active { display: block; }

#results-screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: #FBD913;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 2rem 0;
    animation: pop-in 0.8s ease-out both;
}

h2 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: #FBD913;
    margin: 0.5em 0;
    text-align: center;
}

.results-subtitle {
    color: #FBD913;
    margin-top: -10px;
}

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

.title-image {
    height: clamp(2rem, 6vw, 2.5rem);
    vertical-align: middle;
    transition: transform 0.3s ease;
    box-shadow: 0 0.4rem 0.6rem rgba(0,0,0,0.1);
}
.title-image:hover { transform: scale(3) rotate(5deg); }
.ikea-logo { transform: rotate(-5deg); z-index: 1; }
.word-logo { animation: bounce 1.2s infinite ease-in-out; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#word-display {
    font-family: rubik, sans-serif;
    font-size: clamp(2.5rem, 10vw, 3.5rem);
    font-weight: bold;
    margin: 0.1em 0;
    color: #FBD913;
    word-break: break-all;
    margin-top: -10px;
}

button {
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 0px;
    margin: 5px;
    transition: background-color 0.3s, transform 0.2s ease; 
}
button:hover { transform: translateY(-3px); }

#start-button, #restart-button, .next-btn {
    background-color: #ffdb00;
    color: #0058a3;
    font-weight: bold;
}
#start-button:hover, #restart-button:hover, .next-btn:hover { background-color: #e6c500; }

.choice-btn { background-color: #0058a3; color: white; }
.choice-btn:hover { background-color: #004b8d; }

.next-btn { margin: 20px auto 0 auto; display: block; }


.start-description {
    color: #FBD913;
    margin-bottom: 1.5em;
}

.start-description p {
    margin: 0.5em 0; 
    line-height: 1.5; 
}

.disclaimer {
    color: #FBD913;
    font-size: 0.9em;
    font-style: italic;
    opacity: 0.8; 
}

#feedback { margin-top: 40px; font-size: 1.2em; }
#feedback p { color: #FBD913; }
#feedback .correct, #feedback .incorrect { margin-top: 0; margin-bottom: 10px; font-size: 1.2em; }
#feedback p.correct { color: rgb(0, 255, 0); }
#feedback p.incorrect { color: red; }
#feedback img { max-width: 150px; margin-top: -30px; border-radius: 0px; background-color: white; border: 5px solid #ffdb00; padding: 5px; }

#timer {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 1.1em;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    margin: 0;
    text-align: center;
    color: #0058a3;
    background-color: #ffdb00;
}

#progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 4px solid #ffdb00;
    margin-bottom: 20px;
    position: relative; 
    overflow: hidden;
}

#progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #00ff08; 
    transition: width 0.5s ease-in-out; 
}



.progress-segment { flex-grow: 1; height: 100%; transition: all 0.3s ease; }
.progress-segment.correct { background-color: #00ff08; }
.progress-segment.incorrect { background-color: #F44336; }

#page-footer { position: fixed; bottom: 5px; left: 0; right: 0; text-align: center; color: white; font-size: 0.8em; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); z-index: 1; }
#page-footer p { margin: 1px 0; padding: 0; }
#page-footer a { color: #FBD913; text-decoration: none; font-weight: bold; transition: color 0.2s; }
#page-footer a:hover { color: #d0b413; }

#share-card-template { position: fixed; top: -9999px; left: -9999px; }
.share-card-content {
    width: 400px;
    background: #0471D9;
    color: white;
    font-family: 'Rubik', sans-serif;
    border: 10px solid #FBD913;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 20px 15px 20px; 
    box-sizing: border-box;
}.share-card-description { font-size: 1em; margin: 10px 0 15px 0; color: white; max-width: 90%; }
.share-card-content h2 { font-size: 2em; margin: 0; color: #FBD913; }
.share-card-stats { display: flex; justify-content: space-around; width: 100%; margin-bottom: 20px; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 1.8em; font-weight: bold; }
.stat-label { font-size: 0.9em; color: #e0e0e0; }
.share-card-footer {
    font-size: 1.1em;
    color: #FBD913;
    font-weight: bold;
    margin-top: 0px; 
    margin-bottom: 0; 
    text-shadow: 0 0 5px rgba(251, 217, 19, 0.5);
}

.results-stats-container { display: flex; flex-direction: column; gap: 15px; width: 100%; max-width: 350px; margin: 5px 0; padding: 15px; background-color: rgba(0, 0, 0, 0.1); border-radius: 10px; }
.results-stats-container .stat { flex-direction: row; justify-content: space-between; align-items: center; }
.results-stats-container .stat-value { color: white; }
.results-stats-container .stat-label { color: #e0e0e0; order: -1; }
.results-buttons { margin-top: 20px; display: flex; justify-content: center; gap: 10px; }

.holographic-btn { background: rgba(0, 40, 80, 0.4); color: #e0fbfc; border: none; position: relative; z-index: 1; text-shadow: 0 0 5px #39a0ca, 0 0 10px #39a0ca; }
.holographic-btn::before { content: ''; position: absolute; top: -2px; left: -2px; width: calc(100% + 4px); height: calc(100% + 4px); background: linear-gradient(90deg, #ff00ff, #00ffea, #fffc00, #ff00ff); background-size: 400% 100%; animation: holographic-border-scroll 8s linear infinite; z-index: -1; filter: blur(3px); }
@keyframes holographic-border-scroll { 0% { background-position: 0% 50%; } 100% { background-position: 400% 50%; } }
#share-button:hover { background-color: rgba(0, 60, 110, 0.6); }


.performance-score-container {
    margin-bottom: 15px;
    padding: 10px;
    border: 2px solid #ffdb00;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.performance-score-label {
    font-size: 1em;
    color: #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.performance-score-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px #ffdb00, 0 0 20px #ffdb00;
    animation: pulse-score 2s infinite;
}

@keyframes pulse-score {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}