*, :after, :before {
    box-sizing: border-box;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Festive Christmas background - brighter and more cheerful */
body, html {
    width: 100%;
    height: 100%;
    min-height: 700px;
    background: linear-gradient(180deg, #0f1a28 0%, #1a2838 30%, #2d1a1a 60%, #1a3a1a 100%);
    background-attachment: fixed;
    overflow: hidden !important;
    position: relative;
    font-family: 'Open Sans', sans-serif;
    color: #e0e0e0;
}

/* Twinkling Christmas lights effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background-image: 
        radial-gradient(circle, #ff4444 3px, transparent 3px),
        radial-gradient(circle, #44ff44 3px, transparent 3px),
        radial-gradient(circle, #ffdd44 3px, transparent 3px),
        radial-gradient(circle, #4488ff 3px, transparent 3px),
        radial-gradient(circle, #ff88ff 3px, transparent 3px),
        radial-gradient(circle, #44ffff 3px, transparent 3px);
    background-size: 120px 40px, 110px 40px, 130px 40px, 115px 40px, 125px 40px, 105px 40px;
    background-position: 0 20px, 60px 20px, 30px 20px, 90px 20px, 15px 20px, 75px 20px;
    background-repeat: repeat-x;
    animation: lightsGlow 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1000;
}

@keyframes lightsGlow {
    0%, 100% {
        opacity: 0.8;
        filter: brightness(1);
    }
    50% {
        opacity: 0.9;
        filter: brightness(1.15);
    }
}

/* Gentle falling snow */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 75%, white, transparent);
    background-repeat: repeat;
    background-size: 200px 200px, 250px 250px, 150px 150px, 300px 300px, 180px 180px, 220px 220px;
    animation: snowDrift 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
    opacity: 0.7;
}

@keyframes snowDrift {
    0%, 100% {
        opacity: 0.6;
        transform: translateY(0);
    }
    50% {
        opacity: 0.7;
        transform: translateY(1px);
    }
}

/* Christmas tree on the side */
.login-wrapper::before {
    content: '\1F384';
    position: fixed;
    bottom: 20px;
    left: 5%;
    font-size: 120px;
    opacity: 0.5;
    animation: treeGlow 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 100;
    filter: drop-shadow(0 0 20px rgba(34, 139, 34, 0.8));
}

@keyframes treeGlow {
    0%, 100% {
        opacity: 0.5;
        filter: drop-shadow(0 0 20px rgba(34, 139, 34, 0.8));
    }
    50% {
        opacity: 0.7;
        filter: drop-shadow(0 0 35px rgba(34, 139, 34, 1));
    }
}

/* Gift decoration */
.login-wrapper::after {
    content: '\1F381';
    position: fixed;
    bottom: 30px;
    right: 5%;
    font-size: 80px;
    opacity: 0.6;
    animation: giftBounce 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 100;
    filter: drop-shadow(0 0 15px rgba(220, 20, 60, 0.7));
}

@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

form {
    position: relative;
    z-index: 500;
}

.login-wrapper {
    margin: 7.5% auto;
    max-width: 360px;
    position: relative;
    z-index: 500;
}

.login-logo {
    text-align: center;
    margin: 8px 0;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

.login-message {
    padding: 8px 0;
    text-align: left;
}

.login-message span {
    color: #ff6b6b;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.login-message.info span {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.login-message.success span {
    color: #32cd32;
    text-shadow: 0 0 10px rgba(50, 205, 50, 0.5);
}

.login-link {
    font-weight: 400;
    font-size: 1rem;
    color: #ffd700;
    float: left;
    text-decoration: none;
    background-color: transparent;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    transition: all 0.3s ease;
}

.login-link:hover {
    color: #ffed4e;
    text-shadow: 0 0 12px rgba(255, 237, 78, 0.9);
}

/* Festive Christmas panel - brighter and more welcoming */
.panel {
    margin-bottom: 21px;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 250, 240, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 3px solid transparent;
    border-radius: 12px;
    box-shadow: 
        0 0 40px rgba(220, 20, 60, 0.4),
        0 0 60px rgba(34, 139, 34, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: christmasGlow 4s ease-in-out infinite;
}

@keyframes christmasGlow {
    0%, 100% {
        box-shadow: 
            0 0 40px rgba(220, 20, 60, 0.4),
            0 0 60px rgba(34, 139, 34, 0.3),
            0 8px 32px rgba(0, 0, 0, 0.3);
        border-color: rgba(220, 20, 60, 0.5);
    }
    33% {
        box-shadow: 
            0 0 50px rgba(220, 20, 60, 0.5),
            0 0 70px rgba(34, 139, 34, 0.4),
            0 8px 32px rgba(0, 0, 0, 0.3);
        border-color: rgba(34, 139, 34, 0.6);
    }
    66% {
        box-shadow: 
            0 0 45px rgba(220, 20, 60, 0.45),
            0 0 75px rgba(34, 139, 34, 0.45),
            0 8px 32px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 215, 0, 0.6);
    }
}

.panel.flat {
    margin: 0 !important;
}

/* Gold star on top */
.panel::before {
    content: '\2B50';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 35px;
    opacity: 0.9;
    animation: starTwinkle 2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 1));
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.95;
        transform: translateX(-50%) scale(1.08) rotate(8deg);
    }
}

/* Santa decoration */
.panel::after {
    content: '\1F385';
    position: absolute;
    bottom: -22px;
    right: -22px;
    font-size: 40px;
    opacity: 0.85;
    animation: santaWave 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(220, 20, 60, 0.9));
}

@keyframes santaWave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-8deg);
    }
    75% {
        transform: rotate(8deg);
    }
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-group.has-feedback label {
    display: none;
}

.button-group {
    text-align: right;
    padding: 8px;
    margin: 1rem 0;
}

.form-group label {
    display: block;
    padding: 4px 0;
    font-weight: 700;
    color: #c41e3a;
    text-shadow: 0 0 5px rgba(196, 30, 58, 0.3);
}

/* White input fields with festive borders */
.form-control {
    display: block;
    width: 100%;
    height: 35px;
    padding: 6px 16px;
    background: #ffffff;
    background-image: none;
    border: 2px solid rgba(220, 20, 60, 0.4);
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #333;
    font-weight: 500;
}

.form-control::placeholder {
    color: rgba(100, 100, 100, 0.5);
}

.form-control:focus {
    outline: none;
    background: #fff;
    border-color: #228b22;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 0 15px rgba(34, 139, 34, 0.4),
        0 0 25px rgba(220, 20, 60, 0.2);
}

.form-control-feedback {
    color: #c41e3a;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: block;
    width: 35px !important;
    height: 35px;
    padding: 8px;
    line-height: 35px;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(196, 30, 58, 0.3);
}

.form-control + .form-control-feedback {
    right: 0;
    left: auto;
}

/* Checkbox styling */
input[type="checkbox"] {
    accent-color: #dc143c;
}

/* Festive Christmas button */
.RadButton {
    background: linear-gradient(135deg, #c41e3a 0%, #228b22 50%, #c41e3a 100%) !important;
    background-size: 200% 100% !important;
    border: 2px solid #ffd700 !important;
    color: #fff !important;
    font-weight: bold !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transition: all 0.5s ease !important;
    animation: christmasButtonShine 3s ease-in-out infinite;
}

@keyframes christmasButtonShine {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.RadButton:hover {
    background: linear-gradient(135deg, #dc143c 0%, #32cd32 50%, #dc143c 100%) !important;
    background-size: 200% 100% !important;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.7),
        0 0 40px rgba(220, 20, 60, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px);
}

.RadButton:active {
    transform: translateY(0);
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Enhanced snowflake styling for Christmas */
.snowflake {
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    position: fixed;
    top: -10%;
    z-index: 9999;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
    animation-name: snowflakes-shake;
    animation-duration: 3s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-play-state: running;
}

.snowflake .inner {
    animation-duration: 10s;
    animation-name: snowflakes-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-play-state: running;
}

.snowflake:nth-of-type(3n) {
    font-size: 0.8em;
}

.snowflake:nth-of-type(4n) {
    font-size: 1.2em;
}

.snowflake:nth-of-type(5n) {
    font-size: 1.5em;
}

@keyframes snowflakes-fall {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(110vh);
    }
}

@keyframes snowflakes-shake {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(80px);
    }
}

.snowflake:nth-of-type(0) {
    left: 1%;
    animation-delay: 0s;
}

.snowflake:nth-of-type(0) .inner {
    animation-delay: 0s;
}

.snowflake:first-of-type {
    left: 10%;
    animation-delay: 1s;
}

.snowflake:first-of-type .inner,
.snowflake:nth-of-type(8) .inner {
    animation-delay: 1s;
}

.snowflake:nth-of-type(2) {
    left: 20%;
    animation-delay: 0.5s;
}

.snowflake:nth-of-type(2) .inner,
.snowflake:nth-of-type(6) .inner {
    animation-delay: 6s;
}

.snowflake:nth-of-type(3) {
    left: 30%;
    animation-delay: 2s;
}

.snowflake:nth-of-type(11) .inner,
.snowflake:nth-of-type(3) .inner {
    animation-delay: 4s;
}

.snowflake:nth-of-type(4) {
    left: 40%;
    animation-delay: 2s;
}

.snowflake:nth-of-type(10) .inner,
.snowflake:nth-of-type(4) .inner {
    animation-delay: 2s;
}

.snowflake:nth-of-type(5) {
    left: 50%;
    animation-delay: 3s;
}

.snowflake:nth-of-type(5) .inner {
    animation-delay: 8s;
}

.snowflake:nth-of-type(6) {
    left: 60%;
    animation-delay: 2s;
}

.snowflake:nth-of-type(7) {
    left: 70%;
    animation-delay: 1s;
}

.snowflake:nth-of-type(7) .inner {
    animation-delay: 2.5s;
}

.snowflake:nth-of-type(8) {
    left: 80%;
    animation-delay: 0s;
}

.snowflake:nth-of-type(9) {
    left: 90%;
    animation-delay: 1.5s;
}

.snowflake:nth-of-type(9) .inner {
    animation-delay: 3s;
}

.snowflake:nth-of-type(10) {
    left: 25%;
    animation-delay: 0s;
}

.snowflake:nth-of-type(11) {
    left: 65%;
    animation-delay: 2.5s;
}
