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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('app-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
}

/* Portrait Mode Container */
body {
    width: 100vh;
    height: 100vw;
    transform: rotate(90deg);
    transform-origin: center center;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -50vw;
    margin-left: -50vh;
}

/* Screen Management */
.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Backdrop/Overlay for popup screens */
#registration-screen.active,
#quiz-screen.active,
#thankyou-screen.active,
#score-screen.active,
#result-screen.active,
#draw-screen.active {
    background-image: url('app-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Logo Container */
.logo-container {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 100;
    animation: logoFloat 3s ease-in-out infinite;
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.logo {
    height: 180px;
    width: auto;
    display: inline-block;
    margin: 0 auto;
}

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

/* Slideshow Screen */
#slideshow-screen {
    background-image: url('app-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    position: relative;
}

.slideshow-logo {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    z-index: 10;
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.slideshow-logo-img {
    height: 180px;
    width: auto;
    display: inline-block;
    margin: 0 auto;
    animation: breathAnimation 3s ease-in-out infinite;
}

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

.slideshow-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.slideshow-image-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

#slideshow-image {
    max-width: 80vw;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    transition: opacity 0.5s ease-in-out;
}

/* Different animations for each slide */
.slide-breath {
    animation: slideBreath 3s ease-in-out infinite;
}

.slide-blur {
    animation: slideBlur 4s ease-in-out infinite;
}

.slide-fade {
    animation: slideFade 3s ease-in-out infinite;
}

.slide-zoom {
    animation: slideZoom 4s ease-in-out infinite;
}

.slide-rotate {
    animation: slideRotate 5s ease-in-out infinite;
}

.slide-bounce {
    animation: slideBounce 3s ease-in-out infinite;
}

@keyframes slideBreath {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.1);
    }
}

@keyframes slideBlur {
    0%, 100% {
        filter: blur(0px);
        transform: scale(1);
    }
    50% {
        filter: blur(2px);
        transform: scale(1.02);
    }
}

@keyframes slideFade {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-10px);
    }
}

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

@keyframes slideRotate {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(2deg) scale(1.02);
    }
    75% {
        transform: rotate(-2deg) scale(1.02);
    }
}

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

.slideshow-hint {
    position: absolute;
    bottom: 40px;
    color: white;
    font-size: 1.5em;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: hintPulse 2s ease-in-out infinite;
    padding: 20px 40px;
    background: rgba(30, 58, 138, 0.8);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes hintPulse {
    0%, 100% {
        opacity: 0.7;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
}

#slideshow-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: slideIn 1s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Home Screen */
.home-content {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(30, 58, 138, 0.1);
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}

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

.main-title {
    font-size: 3.5em;
    color: #1E3A8A;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titlePulse 2s ease-in-out infinite;
}

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

.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    padding: 20px 40px;
    font-size: 1.5em;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-draw {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    color: white;
}

.btn-draw:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-true {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    font-size: 2em;
    padding: 30px 60px;
}

.btn-true:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-false {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    color: white;
    font-size: 2em;
    padding: 30px 60px;
}

.btn-false:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Form Styles */
.form-container {
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(30, 58, 138, 0.1);
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}

.form-container h2 {
    color: #1E3A8A;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1E3A8A;
    font-weight: bold;
    font-size: 1.2em;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    background-color: white;
    cursor: pointer;
}

.form-group select:hover {
    border-color: #D1D5DB;
}

/* Quiz Screen */
.quiz-container {
    background: rgba(255, 255, 255, 0.98);
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(30, 58, 138, 0.1);
    width: 90%;
    max-width: 700px;
    text-align: center;
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(30, 58, 138, 0.1);
}

.question-counter {
    font-size: 1.5em;
    color: #1E3A8A;
    font-weight: bold;
}

.timer-display {
    font-size: 1.3em;
    color: #F59E0B;
    font-weight: bold;
    background: rgba(245, 158, 11, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
}

.question-content {
    margin-bottom: 50px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#question-text {
    font-size: 2.2em;
    color: #1E3A8A;
    line-height: 1.6;
    animation: questionFade 0.5s ease-in;
}

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

.answer-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Thank You Screen */
.thankyou-content {
    text-align: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(30, 58, 138, 0.1);
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}

.thankyou-title {
    font-size: 4em;
    color: #1E3A8A;
    margin-bottom: 20px;
    animation: thankYouPulse 1s ease-in-out;
}

.thankyou-message {
    font-size: 1.8em;
    color: #6B7280;
    margin-bottom: 30px;
}

.thankyou-results {
    background: rgba(30, 58, 138, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5em;
}

.result-label {
    color: #6B7280;
    font-weight: bold;
}

.result-value {
    color: #1E3A8A;
    font-weight: bold;
    font-size: 1.2em;
}

.score-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.thankyou-message {
    font-size: 1.8em;
    color: #6B7280;
    margin-bottom: 30px;
}

.thankyou-results {
    background: rgba(30, 58, 138, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5em;
}

.result-label {
    color: #6B7280;
    font-weight: bold;
}

.result-value {
    color: #1E3A8A;
    font-weight: bold;
    font-size: 1.2em;
}

.score-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Score Screen */
.score-container {
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(30, 58, 138, 0.1);
    width: 90%;
    max-width: 700px;
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}

.score-title {
    font-size: 2.5em;
    color: #1E3A8A;
    text-align: center;
    margin-bottom: 30px;
}

.participants-list {
    margin-bottom: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.participant-item {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: 5px solid #3B82F6;
    animation: scoreItemSlide 0.5s ease-out;
    animation-fill-mode: both;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-size: 1.5em;
    color: #1E3A8A;
    font-weight: bold;
    margin-bottom: 5px;
}

.participant-details {
    font-size: 1em;
    color: #6B7280;
}

.participant-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-show-result {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    padding: 12px 25px;
    font-size: 1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-show-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    color: white;
    padding: 12px 25px;
    font-size: 1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.scores-list {
    margin-bottom: 30px;
}

.score-item {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: 5px solid #3B82F6;
    animation: scoreItemSlide 0.5s ease-out;
    animation-fill-mode: both;
}

@keyframes scoreItemSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.score-item:nth-child(1) {
    border-right-color: #F59E0B;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    animation-delay: 0.1s;
}

.score-item:nth-child(2) {
    animation-delay: 0.2s;
}

.score-item:nth-child(3) {
    animation-delay: 0.3s;
}

.score-item:nth-child(4) {
    animation-delay: 0.4s;
}

.score-item:nth-child(5) {
    animation-delay: 0.5s;
}

.score-item-name {
    font-size: 1.5em;
    color: #1E3A8A;
    font-weight: bold;
}

.score-item-score {
    font-size: 1.8em;
    color: #3B82F6;
    font-weight: bold;
}

/* Result Screen */
.result-container {
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(30, 58, 138, 0.1);
    width: 90%;
    max-width: 800px;
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
    max-height: 85vh;
    overflow-y: auto;
}

.result-title {
    font-size: 2.5em;
    color: #1E3A8A;
    text-align: center;
    margin-bottom: 30px;
}

.questions-results {
    margin-bottom: 30px;
}

.question-result-item {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    border-right: 5px solid #3B82F6;
    animation: scoreItemSlide 0.5s ease-out;
    animation-fill-mode: both;
}

.question-result-item.correct {
    border-right-color: #10B981;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
}

.question-result-item.wrong {
    border-right-color: #EF4444;
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
}

.question-result-number {
    font-size: 1.2em;
    color: #6B7280;
    margin-bottom: 10px;
    font-weight: bold;
}

.question-result-text {
    font-size: 1.3em;
    color: #1E3A8A;
    margin-bottom: 15px;
    line-height: 1.6;
}

.question-result-answer {
    font-size: 1.1em;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
}

.question-result-answer.user {
    background: rgba(59, 130, 246, 0.1);
    color: #1E40AF;
}

.question-result-answer.correct-answer {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    font-weight: bold;
}

.question-result-explanation {
    font-size: 1em;
    color: #6B7280;
    margin-top: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border-right: 3px solid #F59E0B;
    line-height: 1.6;
}

/* Draw Screen */
.draw-container {
    background: rgba(255, 255, 255, 0.98);
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(30, 58, 138, 0.1);
    width: 90%;
    max-width: 700px;
    text-align: center;
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}

.draw-title {
    font-size: 2.5em;
    color: #1E3A8A;
    margin-bottom: 40px;
}

.winner-display {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    padding: 60px;
    border-radius: 20px;
    margin-bottom: 40px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 5px solid #F59E0B;
    animation: winnerReveal 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.winner-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: rotate(180deg);
        opacity: 1;
    }
}

@keyframes winnerReveal {
    0% {
        transform: scale(0.5) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.trophy-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    z-index: 1;
}

.trophy-icon {
    font-size: 8em;
    animation: trophyBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    margin-bottom: 10px;
}

@keyframes trophyBounce {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    50% {
        transform: translateY(-5px) rotate(-3deg);
    }
    75% {
        transform: translateY(-10px) rotate(3deg);
    }
}

.winner-rank {
    font-size: 4em;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    padding: 15px 30px;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.5);
    animation: rankPulse 1.5s ease-in-out infinite;
    position: absolute;
    bottom: -20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

/* Different styles for each rank */
.winner-display.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FF8C00;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.winner-display.rank-1 .winner-rank {
    color: #FF8C00;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.4);
}

.winner-display.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    border-color: #808080;
    box-shadow: 0 0 25px rgba(192, 192, 192, 0.5);
}

.winner-display.rank-2 .winner-rank {
    color: #808080;
}

.winner-display.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    border-color: #8B4513;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.5);
}

.winner-display.rank-3 .winner-rank {
    color: #8B4513;
}

.winner-display.rank-4 {
    background: linear-gradient(135deg, #E8E8E8 0%, #D3D3D3 100%);
    border-color: #A9A9A9;
    box-shadow: 0 0 15px rgba(232, 232, 232, 0.4);
}

.winner-display.rank-4 .winner-rank {
    color: #696969;
}

.winner-display.rank-5 {
    background: linear-gradient(135deg, #F5DEB3 0%, #DEB887 100%);
    border-color: #D2B48C;
    box-shadow: 0 0 15px rgba(245, 222, 179, 0.4);
}

.winner-display.rank-5 .winner-rank {
    color: #8B7355;
}

.winner-name {
    font-size: 3.5em;
    color: #1E3A8A;
    margin-bottom: 20px;
    font-weight: bold;
    position: relative;
    z-index: 1;
    animation: nameSlide 0.8s ease-out 0.3s both;
}

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

.winner-score {
    font-size: 2em;
    color: #3B82F6;
    font-weight: bold;
    position: relative;
    z-index: 1;
    animation: scoreSlide 0.8s ease-out 0.5s both;
    margin-bottom: 15px;
}

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

.winner-time {
    font-size: 1.5em;
    color: #6B7280;
    font-weight: bold;
    position: relative;
    z-index: 1;
    animation: timeSlide 0.8s ease-out 0.7s both;
    background: rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 15px;
    display: inline-block;
}

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

.draw-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive adjustments for portrait */
@media (orientation: portrait) {
    body {
        transform: none;
        width: 100vw;
        height: 100vh;
        margin: 0;
        top: 0;
        left: 0;
    }
}

