/* Login Page Styles - Aligned with Register/Reset */

:root {
    --primary-color: #2ac8c8;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --background: #ffffff;
    --surface: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Container to center the form on the page - matching register */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Unique heartbeat bar class - matching register */
.buggy-heartbeat-bar {
    position: absolute;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: var(--text-light);
    opacity: 0.3;
    animation: pulse 2s infinite;
    z-index: 1;
}

/* Mobile responsive heartbeat bar */
@media (max-width: 768px) {
    .login-container {
        padding-bottom: 20px;
    }
    
    .buggy-heartbeat-bar {
        display: none; /* Hide on mobile for now */
    }
}

/* Floating Labels - adapted from quote page */
.buggy-quote-floating-field {
    position: relative;
    margin-bottom: 24px;
}

.buggy-quote-input {
    width: 100%;
    padding: 20px 0 8px 12px; /* Added left padding to match label */
    border: none;
    border-bottom: 2px solid #e5e7eb;
    background: transparent;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.buggy-quote-input:focus {
    border-bottom-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(42, 200, 200, 0.25);
}

.buggy-quote-label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px 0 8px 12px; /* Added left padding to move text right */
    pointer-events: none;
    font-size: 16px;
    color: var(--text-light);
    transition: all 0.3s ease;
    transform-origin: top left;
    font-weight: 400;
}

/* Float label when input has focus or value - JavaScript controlled */
.buggy-quote-floating-field .buggy-quote-input:focus ~ .buggy-quote-label,
.buggy-quote-floating-field.has-value .buggy-quote-label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-1rem) translateX(0.15rem);
    color: var(--primary-color);
}

/* Fallback for browsers that support :placeholder-shown */
.buggy-quote-floating-field .buggy-quote-input:not(:placeholder-shown) ~ .buggy-quote-label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-1rem) translateX(0.15rem);
    color: var(--primary-color);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

/* Login form border - matching register form */
#login_border {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 40px;
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

#login_border:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
}

/* Clock specific styles for login */
.buggy-logo-section {
    margin-bottom: 40px;
}

/* Clock container with glassmorphism background */
.buggy-logo-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.5));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* SVG Clock - 120x120 size */
.buggy-clock-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

/* Clock circle - with glassmorphism transparency (50-60% opacity) */
.buggy-clock-circle {
    fill: rgba(248, 249, 250, 0.6);
    stroke: rgba(222, 226, 230, 0.5);
    stroke-width: 1.5;
    opacity: 0.6;
}

/* Clock hands */
.buggy-hour-hand,
.buggy-minute-hand,
.buggy-second-hand {
    stroke-linecap: round;
    transform-origin: 60px 60px;
}

/* Hour hand - black */
.buggy-hour-hand {
    stroke: #333;
    stroke-width: 4;
    opacity: 1;
    animation: rotate-hour-backwards 3600s linear infinite;
}

/* Minute hand - black */
.buggy-minute-hand {
    stroke: #333;
    stroke-width: 3;
    opacity: 1;
    animation: rotate-minute-backwards 360s linear infinite;
}

/* Second hand - teal, much faster */
.buggy-second-hand {
    stroke: #2ac8c8;
    stroke-width: 2;
    opacity: 1;
    animation: rotate-second-backwards 6s linear infinite;
}

/* Center dot */
.buggy-clock-center {
    fill: #333;
    opacity: 1;
}

/* Backwards rotation animations starting from 11:11:00 */
@keyframes rotate-hour-backwards {
    from {
        transform: rotate(335.5deg); /* 11:11 position */
    }
    to {
        transform: rotate(-24.5deg);
    }
}

@keyframes rotate-minute-backwards {
    from {
        transform: rotate(66deg); /* 11 minutes position */
    }
    to {
        transform: rotate(-294deg);
    }
}

@keyframes rotate-second-backwards {
    from {
        transform: rotate(0deg); /* 00 seconds */
    }
    to {
        transform: rotate(-360deg);
    }
}

/* Form input styling - matching register */
#login_border input[type=text],
#login_border input[type=password],
#login_border input[type=email] {
    width: 100%;
    margin-bottom: 10px;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

#login_border input[type=text]:focus,
#login_border input[type=password]:focus,
#login_border input[type=email]:focus {
    border-color: #2ac8c8;
    box-shadow: 0 0 0 4px rgba(42, 200, 200, 0.1);
    background-color: white;
    outline: none;
}

/* Form labels */
#login_border .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Submit button - matching register */
#login_border button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: #2ac8c8;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 32px;
}

#login_border button[type="submit"]:hover {
    background: #1ea8a8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 200, 200, 0.3);
}

#login_border button[type="submit"]:active {
    transform: translateY(0);
}

/* Remember and forgot section */
.buggy-form-extras {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
}

.buggy-remember-wrapper {
    display: none; /* Hidden but functional */
}

.buggy-forgot-link {
    font-size: 14px;
    color: #2ac8c8;
    text-decoration: none;
}

.buggy-forgot-link:hover {
    text-decoration: underline;
}

/* Sign up section - matching register */
.buggy-signup-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.buggy-signup-text {
    font-size: 14px;
    color: #666;
}

.buggy-signup-link {
    color: #2ac8c8;
    text-decoration: none;
    font-weight: 600;
}

.buggy-signup-link:hover {
    text-decoration: underline;
}

/* Hide footer on login page */
footer,
.footer,
#footer {
    display: none !important;
}

/* Heart Branding */
.buggy-heart-branding {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.heart-container {
    margin-bottom: 8px;
}

.heart-icon {
    font-size: 24px;
    color: var(--primary-color);
    animation: heartBeat 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(42, 200, 200, 0.2));
}

.heart-text {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes heartBeat {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1;
    }
}

/* Hide PWA install prompt */
.pwa-install-prompt {
    display: none !important;
}