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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    min-height: 600px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Name Input Section */
.name-input-section {
    text-align: center;
}

.welcome-message {
    margin-bottom: 30px;
}

.welcome-message h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.welcome-message p {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.5;
}

.name-input-form {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#user-name-input {
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#user-name-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#start-quiz-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

#start-quiz-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#start-quiz-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.current-rankings {
    margin-top: 30px;
}

.current-rankings h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Quiz Section */
.quiz-section {
    animation: fadeIn 0.5s ease-in;
}

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

.score-timer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.player-info {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.player-name {
    color: #667eea;
}

.score, .timer {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
}

.timer {
    color: #e74c3c;
    animation: pulse 1s infinite;
}

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

.question-container {
    text-align: center;
    margin-bottom: 30px;
}

.question-container h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.question-number {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.image-option {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.image-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.image-option.selected {
    border-color: #28a745;
    background: #d4edda;
}

.image-option.correct {
    border-color: #28a745;
    background: #d4edda;
    animation: correctAnswer 0.6s ease;
}

.image-option.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
    animation: incorrectAnswer 0.6s ease;
}

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

@keyframes incorrectAnswer {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.image-option img {
    width: 100%;
    max-width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.image-option:hover img {
    transform: scale(1.05);
}

.image-option p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.feedback {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 30px;
    margin-bottom: 20px;
}

.feedback.correct {
    color: #28a745;
}

.feedback.incorrect {
    color: #dc3545;
}

/* Final Score Section */
.final-score-section {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.final-score {
    padding: 20px;
}

.final-score h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.player-result {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.player-name-result {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.score-result {
    font-size: 1.4rem;
    color: #495057;
    margin-bottom: 10px;
}

.rank-result {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin-top: 10px;
}

.rank-result.top-3 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.rank-result.top-10 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
}

.rank-result.other {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.final-rankings {
    margin-bottom: 30px;
}

.final-rankings h3 {
    color: #2c3e50;
    font-size: 1.6rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Rankings List */
.rankings-list {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.ranking-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.ranking-item:hover {
    transform: translateX(5px);
}

.ranking-item:last-child {
    margin-bottom: 0;
}

.ranking-item.current-player {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.ranking-position {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

.ranking-position.gold {
    color: #ffd700;
}

.ranking-position.silver {
    color: #c0c0c0;
}

.ranking-position.bronze {
    color: #cd7f32;
}

.ranking-name {
    text-align: left;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-score {
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    min-width: 50px;
}

.ranking-time {
    font-weight: 600;
    font-size: 1rem;
    color: #6c757d;
    text-align: right;
    min-width: 60px;
}

.ranking-item.current-player .ranking-time {
    color: rgba(255, 255, 255, 0.9);
}

.no-rankings {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.action-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#new-player-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

#new-player-btn:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .score-timer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .images-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .image-option {
        padding: 15px;
    }
    
    .image-option img {
        max-width: 120px;
        height: 120px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .ranking-item {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        text-align: center;
    }
    
    .ranking-time {
        grid-column: 1 / -1;
        text-align: center;
        font-size: 0.9rem;
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .ranking-item.current-player .ranking-time {
        border-top-color: rgba(255, 255, 255, 0.3);
    }
    
    .ranking-name {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .question-container h2 {
        font-size: 1.4rem;
    }
    
    .image-option img {
        max-width: 100px;
        height: 100px;
    }
    
    #user-name-input {
        max-width: 250px;
    }
}



/* Cookie Consent Banner CSS */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #ffffff;
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-consent-banner.show {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-consent-text {
  flex: 1;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ecf0f1;
}

.cookie-consent-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.cookie-accept {
  background: #27ae60;
  color: white;
}

.cookie-accept:hover {
  background: #2ecc71;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.cookie-decline {
  background: transparent;
  color: #bdc3c7;
  border: 1px solid #7f8c8d;
}

.cookie-decline:hover {
  background: #7f8c8d;
  color: white;
  transform: translateY(-1px);
}

/* Mobile responsive for cookie banner */
@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .cookie-consent-text p {
    font-size: 13px;
  }
  
  .cookie-consent-buttons {
    justify-content: center;
    width: 100%;
  }
  
  .cookie-btn {
    flex: 1;
    max-width: 120px;
  }
}

