/* Festive Color Palette */
:root {
    --christmas-red: #c41e3a;
    --christmas-green: #228b22;
    --christmas-gold: #ffd700;
    --snow-white: #fff;
    --dark-green: #0d5d1f;
    --light-red: #ff6b6b;
    --warm-gold: #ffb347;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Snowflakes Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 1.5em;
    animation: snowfall linear infinite;
    opacity: 0.7;
}

.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 11s; animation-delay: 2s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 13s; animation-delay: 0.5s; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 10s; animation-delay: 1.5s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 12s; animation-delay: 2.5s; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 11s; animation-delay: 0.8s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 13s; animation-delay: 1.8s; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 10s; animation-delay: 0.3s; }
.snowflake:nth-child(10) { left: 15%; animation-duration: 12s; animation-delay: 1.3s; }
.snowflake:nth-child(11) { left: 55%; animation-duration: 11s; animation-delay: 2.3s; }
.snowflake:nth-child(12) { left: 85%; animation-duration: 13s; animation-delay: 0.7s; }

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--christmas-red) 0%, var(--dark-green) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    position: relative;
}

.hero-content h1 {
    color: var(--snow-white);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    font-weight: bold;
}

/* Festive Card */
.festive-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 3px solid var(--christmas-gold);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.festive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* Festive Input */
.festive-input {
    border: 2px solid var(--christmas-green);
    border-radius: 10px;
    padding: 1rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.festive-input:focus {
    border-color: var(--christmas-red);
    box-shadow: 0 0 15px rgba(196, 30, 58, 0.3);
    outline: none;
}

.festive-input.has-value {
    border-color: var(--christmas-gold);
}

/* Festive Button */
.festive-button {
    background: linear-gradient(135deg, var(--christmas-red) 0%, var(--light-red) 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.festive-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, var(--light-red) 0%, var(--christmas-red) 100%);
}

.festive-button:active {
    transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

.animate-slide-up {
    animation: slideUp 1s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out;
}

/* Spinner Styles - Full Screen */
.spinner-fullscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.spinner-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

.spinner-wrapper {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 0 auto;
    max-width: 90vw;
    max-height: 90vw;
}

.spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    border: 20px solid var(--christmas-gold);
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.8), 
                inset 0 0 60px rgba(0,0,0,0.1),
                0 0 120px rgba(196, 30, 58, 0.3);
    background: radial-gradient(circle, #fff 0%, #f0f0f0 100%);
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.spinner-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    transform-origin: 0 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    overflow: hidden;
}

.spinner-segment::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--segment-color, #ff6b6b);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    z-index: 1;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

.spinner-segment:nth-child(odd)::before {
    background: linear-gradient(135deg, var(--christmas-red) 0%, var(--light-red) 100%);
}

.spinner-segment:nth-child(even)::before {
    background: linear-gradient(135deg, var(--christmas-green) 0%, #4ecdc4 100%);
}

.spinner-segment span {
    position: relative;
    z-index: 2;
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
    white-space: nowrap;
    display: inline-block;
    transform: rotate(90deg);
    margin-top: 30px;
    padding: 5px 10px;
}

.spinner-pointer {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid var(--christmas-red);
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
    animation: pointer-pulse 2s ease-in-out infinite;
}

@keyframes pointer-pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
}

/* Result Container */
.result-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(196, 30, 58, 0.2) 100%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.8s ease-in;
}

.result-content {
    text-align: center;
    color: white;
    z-index: 2001;
    position: relative;
    padding: 2rem;
}

.result-name {
    color: var(--christmas-gold);
    text-shadow: 4px 4px 8px rgba(0,0,0,0.7), 0 0 20px rgba(255, 215, 0, 0.5);
    font-weight: bold;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 4px 4px 8px rgba(0,0,0,0.7), 0 0 20px rgba(255, 215, 0, 0.5);
    }
    to {
        text-shadow: 4px 4px 8px rgba(0,0,0,0.7), 0 0 30px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* Confetti */
.confetti-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2000;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--christmas-red);
    animation: confetti-fall 4s linear forwards;
    opacity: 0;
    border-radius: 50%;
}

.confetti:nth-child(1) { left: 5%; animation-delay: 0s; background: var(--christmas-red); }
.confetti:nth-child(2) { left: 10%; animation-delay: 0.1s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(3) { left: 15%; animation-delay: 0.2s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(4) { left: 20%; animation-delay: 0.05s; background: var(--christmas-red); }
.confetti:nth-child(5) { left: 25%; animation-delay: 0.15s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(6) { left: 30%; animation-delay: 0.25s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(7) { left: 35%; animation-delay: 0.1s; background: var(--christmas-red); }
.confetti:nth-child(8) { left: 40%; animation-delay: 0.2s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(9) { left: 45%; animation-delay: 0.3s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(10) { left: 50%; animation-delay: 0.05s; background: var(--christmas-red); }
.confetti:nth-child(11) { left: 55%; animation-delay: 0.15s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(12) { left: 60%; animation-delay: 0.25s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(13) { left: 65%; animation-delay: 0.1s; background: var(--christmas-red); }
.confetti:nth-child(14) { left: 70%; animation-delay: 0.2s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(15) { left: 75%; animation-delay: 0.3s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(16) { left: 80%; animation-delay: 0.05s; background: var(--christmas-red); }
.confetti:nth-child(17) { left: 85%; animation-delay: 0.15s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(18) { left: 90%; animation-delay: 0.25s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(19) { left: 95%; animation-delay: 0.1s; background: var(--christmas-red); }
.confetti:nth-child(20) { left: 3%; animation-delay: 0.2s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(21) { left: 7%; animation-delay: 0.3s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(22) { left: 13%; animation-delay: 0.05s; background: var(--christmas-red); }
.confetti:nth-child(23) { left: 17%; animation-delay: 0.15s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(24) { left: 23%; animation-delay: 0.25s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(25) { left: 27%; animation-delay: 0.1s; background: var(--christmas-red); }
.confetti:nth-child(26) { left: 33%; animation-delay: 0.2s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(27) { left: 37%; animation-delay: 0.3s; background: var(--christmas-gold); width: 14px; height: 14px; }
.confetti:nth-child(28) { left: 43%; animation-delay: 0.05s; background: var(--christmas-red); }
.confetti:nth-child(29) { left: 47%; animation-delay: 0.15s; background: var(--christmas-green); width: 10px; height: 10px; }
.confetti:nth-child(30) { left: 53%; animation-delay: 0.25s; background: var(--christmas-gold); width: 14px; height: 14px; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(calc(var(--random-x, 100) * 1px)) rotate(720deg);
        opacity: 0;
    }
}

/* Dashboard */
.dashboard-container {
    padding: 3rem 0;
}

.assignment-box {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 2px dashed var(--christmas-gold);
}

/* Messages */
.messages-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 10px;
    animation: slideUp 0.3s ease-out;
}

.message-sent {
    background: linear-gradient(135deg, var(--christmas-red) 0%, var(--light-red) 100%);
    color: white;
    margin-left: 20%;
    text-align: right;
}

.message-received {
    background: linear-gradient(135deg, var(--christmas-green) 0%, #4ecdc4 100%);
    color: white;
    margin-right: 20%;
}

.message p {
    margin: 0;
    margin-bottom: 0.25rem;
}

.message small {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--christmas-red) 100%);
    color: white;
    margin-top: auto;
    padding: 1.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .spinner-wrapper {
        width: 90vw;
        height: 90vw;
        max-width: 400px;
        max-height: 400px;
    }

    .spinner {
        border-width: 15px;
    }

    .spinner-segment span {
        font-size: 1rem;
        margin-top: 20px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .message-sent {
        margin-left: 10%;
    }

    .message-received {
        margin-right: 10%;
    }

    .result-content h2 {
        font-size: 2rem;
    }

    .result-name {
        font-size: 2.5rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--christmas-red);
    border-radius: 10px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

