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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #19aeff 0%, #0077cc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

#app {
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Screens */
.screen {
    display: none;
    width: 100%;
    height: 100%;
    padding: 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

/* Welcome Screen */
#welcome-screen {
    text-align: center;
}

.logo h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 2rem;
    opacity: 0.9;
    margin-bottom: 60px;
}

.card-icon {
    margin: 40px 0;
    animation: pulse 2s infinite;
}

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

.status-message {
    margin-top: 40px;
}

#status-text {
    font-size: 1.8rem;
    opacity: 0.8;
}

/* Quiz Screen */
#quiz-screen {
    justify-content: flex-start;
}

.quiz-header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    padding: 20px 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.user-info h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.user-info p {
    font-size: 1.2rem;
    opacity: 0.8;
}

.quiz-progress {
    text-align: right;
    font-size: 1.5rem;
}

.quiz-progress span {
    display: block;
    margin: 5px 0;
}

.quiz-content {
    width: 100%;
    max-width: 1200px;
}

.category-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 10px 30px;
    border-radius: 50px;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.question-text {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    line-height: 1.4;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.answer-btn {
    background: rgba(255,255,255,0.95);
    color: #333;
    border: none;
    border-radius: 20px;
    padding: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.answer-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    background: #fff;
}

.answer-btn:active {
    transform: translateY(-2px);
}

.answer-btn.correct {
    background: #4CAF50;
    color: white;
}

.answer-btn.incorrect {
    background: #f44336;
    color: white;
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.answer-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #19aeff 0%, #0077cc 100%);
    color: white;
    border-radius: 15px;
    font-size: 2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.answer-text {
    flex: 1;
    text-align: left;
}

.timer-container {
    display: flex;
    justify-content: center;
}

.timer {
    font-size: 3rem;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 20px 50px;
    border-radius: 20px;
    min-width: 120px;
    text-align: center;
}

.timer.warning {
    animation: blink 0.5s infinite;
    background: rgba(255,0,0,0.3);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Leaderboard Screen */
.leaderboard-header h1 {
    font-size: 4rem;
    margin-bottom: 40px;
}

.final-score {
    text-align: center;
    margin-bottom: 60px;
}

.final-score h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.final-score-value {
    font-size: 5rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.leaderboard-list {
    width: 100%;
    max-width: 800px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

#leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

#leaderboard-table thead th {
    font-size: 1.5rem;
    padding: 20px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    text-align: left;
}

#leaderboard-table tbody td {
    font-size: 1.3rem;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#leaderboard-table tbody tr:hover {
    background: rgba(255,255,255,0.05);
}

.leaderboard-footer {
    text-align: center;
    margin-top: 40px;
}

.leaderboard-footer p {
    font-size: 1.5rem;
    margin: 10px 0;
}

.leaderboard-footer .small {
    font-size: 1.2rem;
    opacity: 0.7;
}

/* Error Screen */
.error-content {
    text-align: center;
}

.error-icon {
    font-size: 8rem;
    margin-bottom: 30px;
}

.error-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.8;
}

.retry-btn {
    background: #fff;
    color: #19aeff;
    border: none;
    padding: 20px 60px;
    font-size: 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.retry-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .answers-grid {
        grid-template-columns: 1fr;
    }
    
    .logo h1 {
        font-size: 3rem;
    }
    
    .question-text {
        font-size: 1.8rem;
    }
    
    .answer-btn {
        padding: 25px;
        font-size: 1.2rem;
    }
}

/* Návod na pripnutie karty - NOVÉ */
#card-reader-guide {
    position: absolute;
    left: 30px;
    bottom: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 400px;
}

.guide-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.guide-icon {
    flex: 1;
    text-align: center;
}

.monitor-icon, .reader-icon {
    font-size: 3rem;
    margin-bottom: 5px;
    display: block;
}

.icon-label {
    font-size: 0.9rem;
    opacity: 0.9;
    display: block;
}

.arrow-container {
    flex: 0 0 80px;
    position: relative;
    height: 40px;
}

.animated-arrow {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    animation: slideArrow 2s ease-in-out infinite;
}

.animated-arrow svg {
    width: 80px;
    height: 40px;
}

.flying-card {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    animation: flyCard 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes slideArrow {
    0%, 100% {
        right: 0;
        left: auto;
        opacity: 0.5;
    }
    50% {
        right: 20px;
        left: auto;
        opacity: 1;
    }
}

@keyframes flyCard {
    0%, 100% {
        right: 0;
        left: auto;
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    30% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    60% {
        right: 80px;
        left: auto;
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    100% {
        right: 80px;
        left: auto;
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
}

.guide-text {
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    opacity: 0.95;
}

.guide-text strong {
    color: #fff;
    font-weight: 600;
}

.guide-text {
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    opacity: 0.95;
}

.guide-text strong {
    color: #fff;
    font-weight: 600;
}