﻿`, :after, :before {
    box-sizing: border-box;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Winter night sky background with aurora borealis */
body, html {
    width: 100%;
    height: 100%;
    min-height: 700px;
    background: linear-gradient(180deg, #0a1628 0%, #1e3a5f 40%, #2c5f8d 70%, #4a7ba7 100%);
    background-attachment: fixed;
    overflow: hidden !important;
    position: relative;
    font-family: 'Open Sans', sans-serif;
    color: #e0e0e0;
}

/* Aurora borealis effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: -50%;
    width: 200%;
    height: 60%;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(0, 217, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(138, 43, 226, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 40%, rgba(0, 255, 200, 0.1) 0%, transparent 50%);
    animation: aurora 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes aurora {
    0%, 100% {
        transform: translateX(0) translateY(0);
        opacity: 0.6;
    }
    33% {
        transform: translateX(10%) translateY(-5%);
        opacity: 0.8;
    }
    66% {
        transform: translateX(-10%) translateY(-3%);
        opacity: 0.7;
    }
}

/* Twinkling stars */
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),
        radial-gradient(2px 2px at 75% 25%, white, transparent),
        radial-gradient(1px 1px at 15% 85%, white, transparent);
    background-repeat: repeat;
    background-size: 200px 200px, 250px 250px, 150px 150px, 300px 300px, 180px 180px, 220px 220px, 270px 270px, 190px 190px;
    animation: twinkle 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
    opacity: 0.8;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
}

/* Snow drifts at bottom */
.login-wrapper::before {
    content: '';
    position: fixed;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 200px;
    background: 
        radial-gradient(ellipse at 20% 100%, rgba(255, 255, 255, 0.95) 0%, transparent 50%),
        radial-gradient(ellipse at 45% 100%, rgba(255, 255, 255, 0.9) 0%, transparent 45%),
        radial-gradient(ellipse at 70% 100%, rgba(255, 255, 255, 0.95) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 100%, rgba(255, 255, 255, 0.85) 0%, transparent 40%);
    z-index: 100;
    pointer-events: none;
}

/* Additional snow drift layer for depth */
.login-wrapper::after {
    content: '';
    position: fixed;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 150px;
    background: 
        radial-gradient(ellipse at 10% 100%, rgba(230, 242, 255, 0.7) 0%, transparent 40%),
        radial-gradient(ellipse at 35% 100%, rgba(230, 242, 255, 0.8) 0%, transparent 45%),
        radial-gradient(ellipse at 60% 100%, rgba(230, 242, 255, 0.75) 0%, transparent 40%),
        radial-gradient(ellipse at 85% 100%, rgba(230, 242, 255, 0.7) 0%, transparent 38%);
    z-index: 99;
    pointer-events: none;
}

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 15px rgba(179, 217, 255, 0.6));
}

.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: #b3d9ff;
    text-shadow: 0 0 10px rgba(179, 217, 255, 0.5);
}

.login-message.success span {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.login-link {
    font-weight: 400;
    font-size: 1rem;
    color: #b3d9ff;
    float: left;
    text-decoration: none;
    background-color: transparent;
    text-shadow: 0 0 8px rgba(179, 217, 255, 0.6);
    transition: all 0.3s ease;
}

.login-link:hover {
    color: #e6f2ff;
    text-shadow: 0 0 12px rgba(230, 242, 255, 0.9);
}

/* Frosted glass login panel */
.panel {
    margin-bottom: 21px;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(230, 242, 255, 0.15), rgba(179, 217, 255, 0.1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(179, 217, 255, 0.3);
    border-radius: 12px;
    box-shadow: 
        0 0 40px rgba(0, 217, 255, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 60px rgba(255, 255, 255, 0.05);
    position: relative;
    animation: frostGlow 4s ease-in-out infinite;
}

@keyframes frostGlow {
    0%, 100% {
        box-shadow: 
            0 0 40px rgba(0, 217, 255, 0.2),
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 0 60px rgba(255, 255, 255, 0.05);
        border-color: rgba(179, 217, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 60px rgba(0, 217, 255, 0.35),
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 0 80px rgba(255, 255, 255, 0.08);
        border-color: rgba(230, 242, 255, 0.5);
    }
}

.panel.flat {
    margin: 0 !important;
}

/* Snowflake decoration on panel corner */
.panel::after {
    content: '❄️';
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 30px;
    opacity: 0.8;
    animation: snowflakeRotate 10s linear infinite;
    filter: drop-shadow(0 0 8px rgba(179, 217, 255, 0.8));
}

@keyframes snowflakeRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.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: #b3d9ff;
    text-shadow: 0 0 5px rgba(179, 217, 255, 0.5);
}

/* Frosty input fields */
.form-control {
    display: block;
    width: 100%;
    height: 35px;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(230, 242, 255, 0.1), rgba(179, 217, 255, 0.05));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-image: none;
    border: 1px solid rgba(179, 217, 255, 0.4);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: #fff;
    font-weight: 500;
}

.form-control::placeholder {
    color: rgba(179, 217, 255, 0.6);
}

.form-control:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(230, 242, 255, 0.15), rgba(179, 217, 255, 0.1));
    border-color: #00d9ff;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(0, 217, 255, 0.5);
}

.form-control-feedback {
    color: #b3d9ff;
    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 8px rgba(179, 217, 255, 0.6);
}

.form-control + .form-control-feedback {
    right: 0;
    left: auto;
}

/* Checkbox styling */
input[type="checkbox"] {
    accent-color: #00d9ff;
}

/* Override Telerik button styles for winter theme */
.RadButton {
    background: linear-gradient(135deg, #00a8e6 0%, #00d9ff 100%) !important;
    border: 2px solid #b3d9ff !important;
    color: #fff !important;
    font-weight: bold !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 
        0 0 20px rgba(0, 217, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.RadButton:hover {
    background: linear-gradient(135deg, #00d9ff 0%, #b3d9ff 100%) !important;
    box-shadow: 
        0 0 30px rgba(0, 217, 255, 0.6),
        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(0, 217, 255, 0.5),
        inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Enhanced snowflake styling */
.snowflake {
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(179, 217, 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;
}

/* Add varying sizes to snowflakes */
.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;
}
