@import url(//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css);

/* =====================================================
   KEYFRAME ANIMATIONS
   ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, -20%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInContent {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeInBottom {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes checkmark {
    0% {
        stroke-dashoffset: 50;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateIcon {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes sunPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 40px rgba(255, 193, 7, 0.8);
        transform: scale(1.05);
    }
}

/* =====================================================
   BASE STYLES
   ===================================================== */

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    width: 100%;
    height: 100%;
    font-family: 'Open Sans', sans-serif;
    color: white;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    height: calc(100vh);
    width: 100%;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

/* =====================================================
   SECURE LOGIN OVERLAY
   ===================================================== */

.secure-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 30, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.secure-login-overlay.active {
    opacity: 1;
    visibility: visible;
}

.secure-login-content {
    text-align: center;
    padding: 50px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
    max-width: 420px;
    width: 90%;
}

.security-icon-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.security-shield {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: pulse 2s ease-in-out infinite;
}

.security-lock {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.security-check {
    position: absolute;
    width: 30px;
    height: 30px;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInContent 0.5s ease 1s forwards;
}

.security-check svg {
    width: 16px;
    height: 16px;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkmark 0.5s ease 1.2s forwards;
}

.secure-login-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #F5A623, #FFD700, #F5A623);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

.secure-login-status {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 5px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: #F5A623;
    border-radius: 50%;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

.security-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.security-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.security-feature svg {
    width: 18px;
    height: 18px;
    stroke: #4CAF50;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F5A623, #FFD700);
    border-radius: 2px;
    animation: progressFill 2s ease forwards;
}

/* =====================================================
   PRELOADER
   ===================================================== */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

#status {
    width: 100%;
    text-align: center;
}

.spinner {
    margin: 0 auto;
    width: 60px;
    height: 50px;
    text-align: center;
}

.spinner > div {
    background-color: #F5A623;
    height: 100%;
    width: 8px;
    margin: 0 2px;
    display: inline-block;
    animation: sk-stretchdelay 1.2s infinite ease-in-out;
}

.spinner .rect2 { animation-delay: -1.1s; }
.spinner .rect3 { animation-delay: -1.0s; }
.spinner .rect4 { animation-delay: -0.9s; }
.spinner .rect5 { animation-delay: -0.8s; }

@keyframes sk-stretchdelay {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1.0);
    }
}

/* =====================================================
   LOGIN BOX
   ===================================================== */

.login-box {
    margin-top: 75px;
    height: auto;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    opacity: 0;
    animation: fadeInContent 1s ease-in 0.3s both;
    padding-bottom: 30px;
}

.login-key {
    height: 100px;
    font-size: 80px;
    line-height: 100px;
    background: linear-gradient(135deg, #F5A623, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeIn 1s ease-in both;
}

.login-title {
    margin-top: 15px;
    text-align: center;
    font-size: 32px;
    letter-spacing: 2px;
    font-weight: 700;
    font-family: 'Open Sans', sans-serif;
    color: white;
    opacity: 0;
    animation: fadeIn 1s ease-in 0.5s both;
}

.sun-icon {
    display: block;
    font-size: 60px;
    margin-bottom: 15px;
    color: #F5A623;
    animation: sunPulse 2s ease-in-out infinite;
}

.subtitle {
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

.login-form {
    margin-top: 25px;
    text-align: left;
}

/* =====================================================
   FORM INPUTS
   ===================================================== */

input[type=text],
input[type=password] {
    background-color: rgba(255, 255, 255, 0.05);
    text-align: center;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    outline: 0;
    font-size: 1.1em;
    margin-bottom: 25px;
    padding: 15px;
    color: white;
    opacity: 0;
    animation: fadeInContent 1s ease-in 0.7s both;
    transition: all 0.3s ease;
    width: 100%;
}

input[type=text]:focus,
input[type=password]:focus {
    border-bottom-color: #F5A623;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.2);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    font-size: 0.95em;
}

.form-group {
    margin-bottom: 40px;
    outline: 0px;
}

.form-control:focus {
    border-color: inherit;
    -webkit-box-shadow: none;
    box-shadow: none;
    border-bottom: 2px solid #F5A623;
    outline: 0;
    background-color: none;
}

input:focus {
    outline: none;
    box-shadow: 0 0 0;
}

label {
    margin-bottom: 0px;
}

.form-control-label {
    font-size: 10px;
    color: #F5A623;
    font-weight: bold;
    letter-spacing: 1px;
}

/* =====================================================
   ERROR MESSAGE
   ===================================================== */

.error-message {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #ff6b6b;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInContent 0.5s ease;
}

.error-message i {
    font-size: 18px;
}

/* =====================================================
   SUBMIT BUTTON
   ===================================================== */

.btn-outline-primary {
    background: linear-gradient(135deg, #F5A623 0%, #FFD700 100%);
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    padding: 15px 30px;
    border: none;
    box-shadow: 0 10px 30px rgba(245, 166, 35, 0.3);
    opacity: 0;
    animation: fadeInBottom 1s ease-in 0.9s both;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #FFD700 0%, #F5A623 100%);
    color: #1a1a2e;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(245, 166, 35, 0.4);
}

.btn-outline-primary:active {
    transform: translateY(0);
    box-shadow: 0 5px 20px rgba(245, 166, 35, 0.3);
}

.btn-outline-primary i {
    margin-right: 8px;
}

.login-btm {
    float: left;
}

.login-button {
    padding-right: 0px;
    text-align: right;
    margin-bottom: 25px;
}

.login-text {
    text-align: left;
    padding-left: 0px;
    color: #F5A623;
}

.loginbttm {
    padding: 0px;
}

/* =====================================================
   BACKGROUND CIRCLES ANIMATION
   ===================================================== */

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(245, 166, 35, 0.15);
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

.circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .login-box {
        margin-top: 30px;
        margin-left: 15px;
        margin-right: 15px;
    }

    .login-title {
        font-size: 24px;
    }

    .sun-icon {
        font-size: 45px;
    }

    .secure-login-content {
        padding: 30px 20px;
    }

    .security-features {
        flex-direction: column;
        gap: 15px;
    }

    .security-icon-container {
        width: 90px;
        height: 90px;
    }

    .security-lock {
        width: 40px;
        height: 40px;
    }
}
