*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
    /* border: 5px solid black */
}
html {
    height: 100%;
    overscroll-behavior: none;
}
body
{
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}
section
{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* lock to viewport height on mobile */
    min-height: 100vh; /* fallback */
    min-height: 100svh; /* small viewport units */
    min-height: 100dvh; /* dynamic viewport */
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(to bottom,#8b8c8d,#818181);   
    /* border: 5px solid black; */
}
section .color
{
    position: absolute;
    filter: blur(150px);
}
section .color:nth-child(1)
{
    top: -350px;
    width: 1200px;
    height: 1200px;
    background: #830707;
}
section .color:nth-child(2)
{
    bottom: 150px;
    left: 200px;
    width: 300px;
    height: 1000px;
    background: #535353;
}
section .color:nth-child(3)
{
    bottom: 500px;
    right: 210px;
    width: 1200px;
    height: 900px;
    background: #500404;
}
.box
{
    position: relative;
}
.box .square
{
    position: absolute;
    backdrop-filter: blur(5px);
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(192, 34, 34, 0.5);
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    animation: animate 10s linear infinite;
    animation-delay: calc(-1s * var(--i));
}
@keyframes animate
{
    0%,100%
    {
        transform: translateY(-40px);
    }
    50%
    {
        transform: translateY(40px);
    }
}
.box .square:nth-child(1)
{
    top: -50px;
    right: -60px;
    width: 100px;
    height: 100px;
}
.box .square:nth-child(2)
{
    top: 150px;
    right: -100px;
    width: 120px;
    height: 120px;
    z-index: 2;
}
.box .square:nth-child(3)
{
    bottom: 50px;
    right: -60px;
    width: 80px;
    height: 80px;
    z-index: 2;
}
.box .square:nth-child(4)
{
    bottom: -80px;
    left: 100px;
    width: 50px;
    height: 50px;
}
.box .square:nth-child(5)
{
    top: -80px;
    left: 140px;
    width: 60px;
    height: 60px;
}
.container
{
    position: relative;
    width: 400px;
    min-height: 400px;
    background: rgba(87, 2, 2, 0.1);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 25px 45px rgba(197, 29, 29, 0.1);
    border: 1px solid rgba(255,255,255,0.5);
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.form
{
    position: relative;
    width: 100%;
    height: 100%;
    padding: 40px;
}
.form h2
{
    position: relative;
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 40px;
}
.form h3
{
    color: #ffeeee;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 30px;
    margin-top: -30px;
    text-align: center;
}
.form h2::before
{
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 120px;
    height: 2px;
    background: #695151;
}
.form .inputBox
{
    width: 100%;
    margin-top: 20px;
}
.form .inputBox input
{
    width: 100%;
    background: rgba(255,255,255,0.2);
    border: none;
    outline: none;
    padding: 10px 20px;
    border-radius: 35px;
    border: 1px solid rgba(255,255,255,0.5);
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 16px;
    letter-spacing: 1px;
    color: #fff;
    box-shadow: 0 5px 15px rgba(255,255,255,0.05);
}
.form .inputBox input::placeholder
{
    color: #fff;
}
.form .inputBox input[type="submit"]
{
    background: linear-gradient(135deg, #ff6b6b, #ee5a24, #ff4757);
    color: #fff;
    max-width: 120px;
    cursor: pointer;
    margin: 0 auto 20px auto;
    display: block;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    padding: 12px 25px;
    border-radius: 8px; /* Changed from 35px to 8px for rectangular shape */
    box-shadow: 
        0 8px 25px rgba(255, 107, 107, 0.3),
        0 0 20px rgba(255, 71, 87, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: buttonFloat 4s ease-in-out infinite;
}

.form .inputBox input[type="submit"]:hover
{
    background: linear-gradient(135deg, #ff4757, #ff6b6b, #ee5a24);
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 35px rgba(255, 107, 107, 0.4),
        0 0 30px rgba(255, 71, 87, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.form .inputBox input[type="submit"]:active
{
    transform: translateY(-1px) scale(1.02);
}

/* Button shine effect */
.form .inputBox input[type="submit"]::before
{
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: buttonShine 3s linear infinite;
    z-index: 1;
}

/* Button animations */
@keyframes buttonFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

@keyframes buttonShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Button pulse effect on focus */
.form .inputBox input[type="submit"]:focus
{
    outline: none;
    animation: buttonPulse 0.6s ease-in-out;
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
.forget
{
    margin-top: 5px;
    color: #fff;
}
.forget a
{
    color: #fff;
    font-weight: 600;
}

/* Clock styles */
.clock-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Clock box with animated glassy squares (mirrors login container vibe) */
.clock-box {
    position: relative;
    padding: 10px; /* breathing room for squares */
}

.clock-box .clock-square {
    position: absolute;
    backdrop-filter: blur(5px);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(117, 114, 114, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    animation: animate 10s linear infinite;
    animation-delay: calc(-1s * var(--i));
    pointer-events: none; /* do not block hover on clock */
    z-index: 1;
}

.clock-box .clock-square:nth-child(1) {
    top: -18px;
    right: -24px;
    width: 70px;
    height: 70px;
}

.clock-box .clock-square:nth-child(2) {
    bottom: -28px;
    left: -26px;
    width: 85px;
    height: 85px;
}

.clock-box .clock-square:nth-child(3) {
    top: -35px;
    left: 38px;
    width: 50px;
    height: 50px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.clock {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25), 
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.15)
    );
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-radius: 25px;
    padding: 25px 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(255, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 2; /* above squares */
    animation: float 3s ease-in-out infinite; /* move float to inner clock */
    will-change: transform;
}

.clock:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(255, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.3);
}

.clock::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 4s linear infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.time {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.date {
    font-weight: bold;
    font-size: 14px;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 0 8px rgba(248, 248, 248, 0.4);
    animation: slideUpDown 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes slideUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Logo styles */
.logo {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto 20px auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Make logo white */
    animation: logoFloat 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

/* Logo container with animated squares */
.form h2 {
    position: relative;
    color: #c22626;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

.form h2::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 120px;
    height: 2px;
    background: #695151;
}

/* Add animated squares around logo */
.form h2::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: logoShine 6s linear infinite;
    border-radius: 15px;
    z-index: 1;
}

/* Logo animations */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes logoShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Logo pulse effect */
.logo:hover {
    animation: logoPulse 0.6s ease-in-out;
    filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Floating animated squares around logo */
.form h2 {
    position: relative;
}

.form h2 .logo-square {
    position: absolute;
    backdrop-filter: blur(5px);
    box-shadow: 0 15px 35px rgba(100, 3, 3, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    animation: logoSquareFloat 8s ease-in-out infinite;
    animation-delay: calc(-2s * var(--i));
    pointer-events: none;
    z-index: 1;
}

.form h2 .logo-square:nth-child(1) {
    top: -30px;
    right: -25px;
    width: 40px;
    height: 40px;
    --i: 0;
}

.form h2 .logo-square:nth-child(2) {
    bottom: -35px;
    left: -30px;
    width: 50px;
    height: 50px;
    --i: 1;
}

.form h2 .logo-square:nth-child(3) {
    top: -20px;
    left: -20px;
    width: 35px;
    height: 35px;
    --i: 2;
}

@keyframes logoSquareFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-15px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-25px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
        opacity: 1;
    }
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
    .container {
        width: 90%;
        max-width: 350px;
        min-height: 350px;
        padding: 20px;
    }
    
    .form {
        padding: 30px 20px;
    }
    
    .form h2 {
        font-size: 20px;
        margin-bottom: 30px;
    }
    
    /* Reduce login button size for mobile */
    .form .inputBox input[type="submit"] {
        max-width: 100px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Adjust logo size and animations for mobile */
    .logo {
        width: 100px;
    }
    
    .form h2 .logo-square:nth-child(1) {
        top: -25px;
        right: -20px;
        width: 35px;
        height: 35px;
    }
    
    .form h2 .logo-square:nth-child(2) {
        bottom: -30px;
        left: -25px;
        width: 40px;
        height: 40px;
    }
    
    .form h2 .logo-square:nth-child(3) {
        top: -15px;
        left: -15px;
        width: 30px;
        height: 30px;
    }
    
    .form .inputBox input {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .clock-container {
        position: fixed;
        bottom: max(15px, env(safe-area-inset-bottom));
        right: max(15px, env(safe-area-inset-right));
        z-index: 1000;
        width: auto;
        max-width: 200px;
    }
    
    .clock {
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.3), 
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.2)
        );
        backdrop-filter: blur(20px) saturate(200%);
        -webkit-backdrop-filter: blur(20px) saturate(200%);
        border-radius: 20px;
        padding: 18px 22px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        border-right: 1px solid rgba(255, 255, 255, 0.3);
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 
            0 8px 25px rgba(0, 0, 0, 0.2),
            0 0 20px rgba(255, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            inset 0 -1px 0 rgba(255, 255, 255, 0.3);
    }

    /* Smaller animated squares around clock on tablets/large phones */
    .clock-box { padding: 6px; }
    .clock-box .clock-square:nth-child(1) {
        top: -14px; right: -18px; width: 50px; height: 50px;
    }
    .clock-box .clock-square:nth-child(2) {
        bottom: -20px; left: -18px; width: 60px; height: 60px;
    }
    .clock-box .clock-square:nth-child(3) {
        top: -24px; left: 28px; width: 40px; height: 40px;
    }
    
    .time {
        font-size: 22px;
        font-weight: 700;
        color: #ff0000;
        text-align: center;
        margin-bottom: 8px;
        text-shadow: 
            0 0 12px rgba(255, 0, 0, 0.7),
            0 0 25px rgba(255, 0, 0, 0.4);
        letter-spacing: 0.5px;
    }
    
    .date {
        font-size: 13px;
        color: #ff0000;
        text-align: center;
        text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
        line-height: 1.2;
    }
    
    /* Make sure clock is visible on mobile */
    .clock-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Adjust background colors for better mobile visibility */
    section .color:nth-child(1) {
        width: 400px;
        height: 400px;
        top: -200px;
    }
    
    section .color:nth-child(2) {
        width: 350px;
        height: 350px;
        bottom: -100px;
        left: 100px;
    }
    
    section .color:nth-child(3) {
        width: 300px;
        height: 300px;
        bottom: 30px;
        right: 100px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        width: 95%;
        max-width: 300px;
        min-height: 320px;
    }
    
    .form {
        padding: 25px 15px;
    }
    
    .form h2 {
        font-size: 18px;
        margin-bottom: 25px;
    }
    
    /* Further reduce login button size for small mobile */
    .form .inputBox input[type="submit"] {
        max-width: 80px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* Further adjust logo for small mobile */
    .logo {
        width: 80px;
    }
    
    .form h2 .logo-square:nth-child(1) {
        top: -20px;
        right: -15px;
        width: 30px;
        height: 30px;
    }
    
    .form h2 .logo-square:nth-child(2) {
        bottom: -25px;
        left: -20px;
        width: 35px;
        height: 35px;
    }
    
    .form h2 .logo-square:nth-child(3) {
        top: -12px;
        left: -12px;
        width: 25px;
        height: 25px;
    }
    
    .form .inputBox input {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .clock-container {
        bottom: max(10px, env(safe-area-inset-bottom));
        right: max(10px, env(safe-area-inset-right));
        max-width: 180px;
    }
    
    .clock {
        padding: 15px 18px;
        border-radius: 18px;
    }

    /* Further reduce or hide some squares on small phones */
    .clock-box { padding: 4px; }
    .clock-box .clock-square:nth-child(1) {
        top: -10px; right: -12px; width: 40px; height: 40px;
    }
    .clock-box .clock-square:nth-child(2) {
        bottom: -14px; left: -12px; width: 48px; height: 48px;
    }
    .clock-box .clock-square:nth-child(3) {
        display: none;
    }
    
    .time {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .date {
        font-size: 12px;
    }
    
    /* Further reduce background colors for small screens */
    section .color:nth-child(1) {
        width: 300px;
        height: 300px;
        top: -150px;
    }
    
    section .color:nth-child(2) {
        width: 250px;
        height: 250px;
        bottom: -80px;
        left: 50px;
    }
    
    section .color:nth-child(3) {
        width: 200px;
        height: 200px;
        bottom: 20px;
        right: 50px;
    }
}