/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Carter+One&family=Antonio:wght@100;200;300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --font-title: 'Carter One', cursive;
  --font-headline: 'Antonio', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0a2e 0%, #1a5c8a 100%);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: #e0fcff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
}

@keyframes gradientAnimation {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0) rotateZ(0deg);
    }
    25% {
        transform: translateY(-5px) rotateZ(-1deg);
    }
    75% {
        transform: translateY(5px) rotateZ(1deg);
    }
}

@keyframes slideInBounce {
    0% {
        transform: translateY(50px) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: translateY(-10px) scale(1.05);
    }
    80% {
        transform: translateY(5px) scale(0.98);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.5),
                    inset 0 0 20px rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 255, 0.8),
                    inset 0 0 30px rgba(0, 255, 255, 0.2);
    }
}

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1) rotateZ(0deg);
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.05) rotateZ(-1deg);
        text-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
    }
}

@keyframes playerCardIn {
    0% {
        transform: scale(0) rotateY(180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes revealAnswer {
    0% {
        transform: scale(0) rotateZ(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotateZ(90deg);
    }
    100% {
        transform: scale(1) rotateZ(0deg);
        opacity: 1;
    }
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes scorePopIn {
    0% {
        transform: scale(0) rotateZ(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotateZ(90deg);
    }
    100% {
        transform: scale(1) rotateZ(0deg);
        opacity: 1;
    }
}

@keyframes voteSlideIn {
    0% {
        transform: translateX(-100%) rotateY(90deg);
        opacity: 0;
    }
    100% {
        transform: translateX(0) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes checkmarkDraw {
    0% {
        stroke-dashoffset: 100;
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        stroke-dashoffset: 0;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes scoreRise {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes medalBounce {
    0% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
    60% {
        transform: translateY(10px) scale(1.1);
    }
    80% {
        transform: translateY(-5px) scale(0.95);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes crownFloat {
    0%, 100% {
        transform: translateY(0) rotateZ(0deg);
    }
    50% {
        transform: translateY(-10px) rotateZ(5deg);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

/* Button hover effects */
.nicegui-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--spring);
}

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

.nicegui-button:active::before {
    width: 300px;
    height: 300px;
}

.nicegui-button:active {
    animation: buttonPress 0.3s ease;
}

/* Animated card styles */
.animated-card {
    animation: slideInBounce 0.6s var(--spring) forwards;
    transition: all 0.3s var(--spring);
}

.animated-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

/* Player card animations */
.player-card {
    animation: playerCardIn 0.5s var(--spring) forwards;
    transition: all 0.3s var(--spring);
}

.player-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

/* Shimmer effect for room code */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

/* Score animations */
.score-item {
    transition: all 0.3s var(--spring);
}

.score-item.score-item-active {
    animation: scoreRise 0.5s var(--spring) forwards;
}

.score-item:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.15s; }
.stagger-3 { animation-delay: 0.2s; }
.stagger-4 { animation-delay: 0.25s; }
.stagger-5 { animation-delay: 0.3s; }
.stagger-6 { animation-delay: 0.35s; }
.stagger-7 { animation-delay: 0.4s; }
.stagger-8 { animation-delay: 0.45s; }

/* Vote button animations */
.vote-btn {
    animation: voteSlideIn 0.5s var(--spring) forwards;
}

.vote-btn-real {
    animation-delay: 0s;
}

.vote-btn-fake {
    animation-delay: 0.1s;
}

/* Reveal animations */
.reveal-answer {
    animation: revealAnswer 0.6s var(--spring) forwards;
}

/* Glow animations - only for specific elements */
.glow-infinite {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Title hover effect */
.title-hover {
    transition: all 0.3s var(--spring);
}

.title-hover:hover {
    transform: scale(1.1) rotateZ(-3deg);
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
}

/* One-time animations */
.animate-slideIn {
    animation: slideInBounce 0.6s var(--spring) forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s forwards;
}

.animate-fadeOut {
    animation: fadeOut 0.5s forwards;
}

.animate-scorePopIn {
    animation: scorePopIn 0.5s forwards;
}

.animate-medalBounce {
    animation: medalBounce 0.8s forwards;
}

.animate-shake {
    animation: shake 0.5s;
}

.q-card {
    background-color: rgba(51, 1, 99, 0.938) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.settings-card {
    background-color: rgba(0, 55, 156, 0.938) !important;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Smooth transitions for visibility changes */
.fade-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-transition[style*="display: none"] {
    opacity: 0;
    transform: translateY(-10px);
}

/* Prevent layout shift during updates */
.stable-height {
    min-height: 60px;
    transition: all 0.3s ease;
}

/* Smooth card updates */
.q-card {
    transition: all 0.3s ease !important;
}

/* Picture-in-Picture Source Display */
.pip-source {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    max-width: 90vw;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 12px;
    padding: 12px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    animation: pipSlideIn 0.5s var(--spring) forwards;
}

.pip-source-header {
    color: #00ffff;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pip-source-url {
    color: #e0fcff;
    font-size: 14px;
    word-break: break-all;
    line-height: 1.3;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.pip-source-url:hover {
    opacity: 1;
    color: #00ffff;
}

.pip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.3s ease;
}

.pip-close:hover {
    color: #fff;
}

@keyframes pipSlideIn {
    0% {
        transform: translateX(100%) translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes pipSlideOut {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(50px);
        opacity: 0;
    }
}

.pip-source.pip-exit {
    animation: pipSlideOut 0.3s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .pip-source {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
}

/* Game title and logo styling */
.game-title {
    font-family: var(--font-title) !important;
    font-weight: 400;
}

/* Headlines styling */
.headline-text {
    font-family: var(--font-headline) !important;
    font-weight: 500;
}

/* All other text elements */
* {
    font-family: var(--font-body);
}

/* Specific overrides for important elements */
.q-btn, button {
    font-family: var(--font-body) !important;
    font-weight: 500;
}

label, .q-item__label {
    font-family: var(--font-body) !important;
}

input, .q-field__native {
    font-family: var(--font-body) !important;
}

/* QR Code Styling */
.qr-container {
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 255, 255, 0.2);
}

.qr-container:hover {
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: scale(1.02);
}

.qr-image {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.3));
}

.qr-image:hover {
    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.5));
}

/* QR code animations */
@keyframes qrScan {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    }
}

.qr-scan-animation {
    animation: qrScan 2s ease-in-out infinite;
}

/* VIP Player Styling */
.vip-player-card {
    border: 3px solid #ff1493 !important;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.6),
                0 0 40px rgba(255, 20, 147, 0.4),
                inset 0 0 20px rgba(255, 20, 147, 0.2) !important;
    animation: vipPulse 2s ease-in-out infinite;
    position: relative;
    overflow: visible;
}

.vip-player-card::before {
    content: '👑 VIP';
    position: absolute;
    top: -10px;
    right: -5px;
    background: linear-gradient(45deg, #ff1493, #ff69b4);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.8);
    z-index: 10;
}

@keyframes vipPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 20, 147, 0.6),
                    0 0 40px rgba(255, 20, 147, 0.4),
                    inset 0 0 20px rgba(255, 20, 147, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 20, 147, 0.8),
                    0 0 60px rgba(255, 20, 147, 0.6),
                    inset 0 0 30px rgba(255, 20, 147, 0.3);
    }
}

.vip-controls {
    background: linear-gradient(45deg, rgba(255, 20, 147, 0.1), rgba(255, 105, 180, 0.1));
    border: 2px solid rgba(255, 20, 147, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.vip-button {
    background: linear-gradient(45deg, #ff1493, #ff69b4) !important;
    border: none !important;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.5) !important;
    animation: vipButtonGlow 2s ease-in-out infinite;
}

@keyframes vipButtonGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 20, 147, 0.5) !important;
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 20, 147, 0.8) !important;
    }
}

/* VIP Settings Panel */
.vip-settings-btn {
    background: linear-gradient(45deg, #ff1493, #ff69b4) !important;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.6) !important;
    animation: vipPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.vip-settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 20, 147, 0.8) !important;
}

.vip-settings-panel {
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 20, 147, 0.3);
    animation: slideInFromRight 0.3s ease forwards;
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
} 