/* =========================================
   1. ROOT VARIABLES & BASE STYLES
   ========================================= */
:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --accent-color: #ff0099;
    --bg-dark: #0f0c29;
    --bg-mid: #302b63;
    --bg-light: #24243e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-light: #f8f9fa;
    --input-bg: rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid), var(--bg-light));
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Helpful Background Image Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Replace with your actual image path, e.g., url('../images/bg-tech.jpg') */
    background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80'); 
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

#mainCoantiner {
    position: relative;
    z-index: 1;
}

/* =========================================
   2. ANIMATED BACKGROUND PARTICLES (STARS)
   ========================================= */
.starsec, .starthird, .starfourth, .starfifth {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.starsec {
    background: transparent;
    animation: starPulse 4s infinite ease-in-out;
}
.starthird {
    background: transparent;
    animation: starPulse 6s infinite ease-in-out 1s;
}
.starfourth {
    background: transparent;
    animation: starPulse 8s infinite ease-in-out 2s;
}
.starfifth {
    background: transparent;
    animation: starPulse 10s infinite ease-in-out 3s;
}

/* Generating star dots using box-shadow for performance */
.starsec::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 
        50px 50px #fff, 150px 200px #fff, 300px 50px #fff, 400px 300px #fff,
        600px 100px #fff, 800px 400px #fff, 1000px 200px #fff, 1200px 100px #fff;
    animation: floatStars 20s linear infinite;
}

.starthird::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 
        100px 150px var(--primary-color), 250px 300px var(--primary-color), 450px 100px var(--primary-color), 
        650px 350px var(--primary-color), 850px 50px var(--primary-color), 1050px 250px var(--primary-color);
    animation: floatStars 25s linear infinite reverse;
}

@keyframes floatStars {
    0% { transform: translateY(0); }
    100% { transform: translateY(-1000px); }
}

@keyframes starPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* =========================================
   3. LOGIN CARD ANIMATION & GLASSMORPHISM
   ========================================= */
.card {
    background:#17a2b8; /* soft white */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;

    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 210, 255, 0.1);

    overflow: hidden;

    animation: slideUpFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(50px);

    transition: all 0.4s ease;
}
.card:hover {
    box-shadow: 0 20px 50px rgba(0, 210, 255, 0.15), 
                inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card p,
.card label {
    color: #1a1a1a;
}
.textbox-dg {
    background: #f5f7fa !important;
    border: 2px solid #e0e0e0 !important;
    color: #333 !important;
}
.text-white{color:#000!important;}
.textbox-dg:focus {
    border-color: var(--primary-color) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.2);
}
@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#formBg {
    padding: 40px 30px;
}

/* =========================================
   4. TYPOGRAPHY & LINKS
   ========================================= */
.colorboard {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 20px;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 3s infinite linear;
    background-size: 200% auto;
}

@keyframes shimmerText {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

a.text-white:hover {
    color: var(--primary-color) !important;
}

/* =========================================
   5. ACCURATE & ATTRACTIVE INPUT BOXES
   ========================================= */
.textbox-dg {
    background: var(--input-bg) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    color: #fff !important;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.textbox-dg::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

/* Focus State - The "Accurate" feel */
.textbox-dg:focus {
    border-color: var(--primary-color) !important;
    background: rgba(0, 210, 255, 0.05) !important;
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.15), 
                inset 0 2px 4px rgba(0,0,0,0.2) !important;
    outline: none !important;
    transform: translateY(-2px);
}

.input-group {
    margin-bottom: 1.5rem !important;
}

/* =========================================
   6. BUTTON STYLING
   ========================================= */
.logn-btn {
        background: linear-gradient(45deg, #010204, var(--primary-color));
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.logn-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.logn-btn:hover::before {
    left: 100%;
}

.logn-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.5);
    color: #fff;
}

.logn-btn:active {
    transform: translateY(1px);
}

/* =========================================
   7. ERROR MESSAGE STYLING
   ========================================= */
.field-validation-error {
    color: #ff4d4d;
    font-size: 0.85rem;
    margin-top: -10px;
    margin-bottom: 15px;
    display: block;
    text-align: left;
}

/* =========================================
   8. FULL DEVICE RESPONSIVENESS
   ========================================= */
.container {
    max-width: 100%;
}

/* Tablets and smaller desktops */
@media (max-width: 992px) {
    .col-lg-5 {
        max-width: 450px;
    }
}

/* Mobile devices */
@media (max-width: 576px) {
    #formBg {
        padding: 30px 20px;
    }
    
    .colorboard {
        font-size: 1.5rem;
    }
    
    .card {
        margin: 20px;
        border-radius: 15px;
    }
    
    .textbox-dg {
        padding: 12px 15px;
    }
    
    .logn-btn {
        padding: 12px;
        font-size: 16px;
    }

    /* Adjust logo size on mobile */
    img[style*="width: 163px"] {
        width: 120px !important;
    }
}