/* ========================================
   UNIVERSE FRAME TRANSCENDENTAL CAT ANIMATION
   Self-contained styling for cat component
   Works independently on any page
   ======================================== */

.cat-animation-component {
    display: flex;
    flex-direction: column;
    align-items: center;      /* Center horizontally */
    justify-content: center;  /* Center vertically */
    gap: 0;
    flex-shrink: 0;
    margin: 0 auto;           /* Center the container itself */
}

.character-canvas {
    image-rendering: pixelated;
    display: block;
    margin: 0 auto;           /* Center canvas */
}

.cat-datetime-default {
    text-align: center;
    color: #94a3b8;
    font-size: 0.75rem;
    white-space: nowrap;
    line-height: 1;
    margin-top: 0.25rem;
    /* Fixed dimensions to prevent flex reflow oscillation */
    min-width: 160px;
    max-width: 160px;
    flex-shrink: 0;
}

/* Gentle breathing animation for all date/time elements - globally consistent tempo */
@keyframes breathe-datetime {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#currentTime,
#currentTimeCompact {
    font-variant-numeric: tabular-nums; /* Monospace digits for stable width */
    color: #94a3b8; /* Base color - works on both light/dark backgrounds */
    animation: breathe-datetime 2s ease-in-out infinite;
}

/* Playground date-time-display - tight width to snap to buttons while preventing digit-change jitter */
.date-time-display {
    white-space: nowrap;
    min-width: 70px;
    max-width: 70px;
    flex-shrink: 0;
    text-align: right;
}

/* Auth Pages: Always centered at 125×125px */
.login-container .cat-animation-component,
.signup-container .cat-animation-component,
.forgot-container .cat-animation-component {
    width: 125px !important;
    height: 125px !important;
    margin: 0 auto 1.5rem auto; /* Center with bottom margin */
    position: relative;
    z-index: 10; /* Above other elements */
}

.login-container .character-canvas,
.signup-container .character-canvas,
.forgot-container .character-canvas {
    width: 125px !important;
    height: 125px !important;
}

/* Auth Pages - Mobile: Smaller cat with more spacing */
@media (max-width: 480px) {
    .login-container .cat-animation-component,
    .signup-container .cat-animation-component,
    .forgot-container .cat-animation-component {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto 2rem auto; /* More space below on mobile */
    }
    
    .login-container .character-canvas,
    .signup-container .character-canvas,
    .forgot-container .character-canvas {
        width: 100px !important;
        height: 100px !important;
    }
    
    .login-container .cat-datetime-default,
    .signup-container .cat-datetime-default,
    .forgot-container .cat-datetime-default {
        font-size: 0.65rem !important;
        margin-top: 0.5rem !important;
    }
}

/* Dashboard (index.html) - Mobile Mode */
body.mobile-mode .cat-animation-component {
    width: 75px !important;
    height: 75px !important;
    margin: 0 !important; /* Let dashboard CSS handle positioning */
}

body.mobile-mode .character-canvas {
    width: 75px !important;
    height: 75px !important;
}

body.mobile-mode .cat-datetime-default {
    font-size: 0.6rem !important;
}

/* Dashboard (index.html) - Desktop Mode */
body.desktop-mode .cat-animation-component {
    width: 100px !important;
    height: 100px !important;
    margin: 0 !important; /* Let dashboard CSS handle positioning */
}

body.desktop-mode .character-canvas {
    width: 100px !important;
    height: 100px !important;
}
