/* ============================================
   ZukeX Login Page Styles - Updated Design
   Dark Gray Background with Orange Accents
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff8b00;
    --secondary-color: #ff9f1a;
    --accent-color: #ffa733;
    --background-dark: #2d2d2d;
    --text-light: #ffffff;
    --text-dark: #1f2937;
    --text-gray: #9ca3af;
    --card-bg: #ffffff;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background: var(--background-dark);
    margin: 0;
    padding: 0;
    /* Add these lines to prevent initial flash */
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

body.loaded {
    opacity: 1;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a, #2d2d2d);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   FLOATING ORBS / PARTICLES (Orange tones)
   ============================================ */

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
    z-index: 1;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color), transparent);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary-color), transparent);
    bottom: -200px;
    right: -200px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-color), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 30px) scale(1.05);
    }
}

/* ============================================
   PARTICLE SYSTEM
   ============================================ */

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 139, 0, 0.4);
    border-radius: 50%;
    animation: particleFloat 15s infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

   .login-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /* Add these to prevent movement */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto; /* Allow scrolling if needed */
}

/* ============================================
   LOGIN CARD - STABLE POSITIONING
   ============================================ */

.login-card {
    background: var(--card-bg);
    border-radius: 24px;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    box-shadow: var(--shadow);
    animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    transition: all 0.3s ease;
    /* Add these to prevent card movement */
    margin: auto; /* Center the card */
    will-change: transform; /* Optimize animations */
}

/* Remove hover transform on card to prevent jumping */
.login-card:hover {
    /* Remove: transform: translateY(-5px); */
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1); /* Reset to 0, not maintain hover state */
    }
}


/* ============================================
   LEFT SIDE - CONTENT
   ============================================ */

.card-content-wrapper {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Changed from center to space-between */
    position: relative;
    z-index: 2;
}

/* Add this new class */
.card-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2rem;
}

.logo {
    width: 60px;
    height: 60px;
    animation: logoFloat 3s ease-in-out infinite;
}

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

.card-header {
    text-align: left;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.card-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* ============================================
   VALUE PROPOSITIONS
   ============================================ */

.value-props {
    margin: 1.5rem 0 2rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(255, 139, 0, 0.08), rgba(255, 159, 26, 0.05));
    border-radius: 16px;
    border: 1px solid rgba(255, 139, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.value-props::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0.8;
}

.prop-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
    animation: fadeInUp 0.6s ease-out both;
}

.prop-item:nth-child(1) { animation-delay: 0.1s; }
.prop-item:nth-child(2) { animation-delay: 0.2s; }
.prop-item:nth-child(3) { animation-delay: 0.3s; }
.prop-item:nth-child(4) { animation-delay: 0.4s; }

.prop-item:last-child {
    margin-bottom: 0;
}

.prop-item:hover {
    transform: translateX(4px);
}

.prop-icon {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
    min-width: 16px;
    text-align: center;
    filter: drop-shadow(0 0 4px rgba(255, 139, 0, 0.3));
    animation: checkPulse 2s ease-in-out infinite;
}

.prop-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-dark);
    font-weight: 500;
}

.prop-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* ============================================
   BUTTONS
   ============================================ */

.card-content {
    flex: 1;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(255, 139, 0, 0.3);
}

.submit-button span {
    position: relative;
    z-index: 2;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-button:hover::before {
    width: 300px;
    height: 300px;
}

.submit-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(255, 139, 0, 0.5),
        0 0 40px rgba(255, 139, 0, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Logout Button */
.logout-button {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.logout-button:not(:disabled):hover {
    box-shadow: 
        0 8px 25px rgba(107, 114, 128, 0.5),
        0 0 40px rgba(107, 114, 128, 0.3);
}

/* Loading State */
.submit-button.loading {
    pointer-events: none;
    animation: buttonPulse 1.5s ease-in-out infinite;
}

.submit-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    z-index: 3;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 139, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 139, 0, 0.6);
    }
}

/* ============================================
   SOCIAL ICONS
   ============================================ */

   .social-icons {
    display: flex;
    gap: 0.75rem; /* Reduced from 1rem */
    justify-content: flex-start;
    align-items: center;
    margin-top: auto; /* Pushes to bottom */
    padding-top: 2rem; /* Space from content above */
}

.social-icon {
    width: 36px; /* Reduced from 40px */
    height: 36px; /* Reduced from 40px */
    border-radius: 50%;
    background: rgba(255, 139, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem; /* Reduced from 1.2rem */
}

.social-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 139, 0, 0.4);
}

/* ============================================
   RESPONSIVE - UPDATE MOBILE STYLES
   ============================================ */

   @media (max-width: 968px) {
    .social-icons {
        justify-content: center;
        padding-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .social-icon {
        width: 32px; /* Even smaller on mobile */
        height: 32px;
        font-size: 0.9rem;
    }
    
    .social-icons {
        gap: 0.5rem;
    }
}

/* ============================================
   RIGHT SIDE - IMAGE
   ============================================ */

.card-image-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay gradient on image */
.card-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 139, 0, 0.1),
        rgba(255, 159, 26, 0.1)
    );
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   VIDEO BACKGROUND (OPTIONAL)
   ============================================ */

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 45, 45, 0.8);
    z-index: 1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) brightness(0.5);
}

/* ============================================
   SUCCESS/ERROR MESSAGES
   ============================================ */

.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    text-align: center;
    animation: slideInBottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.error-message {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    text-align: center;
    animation: slideInBottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes checkPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(255, 139, 0, 0.3));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(255, 139, 0, 0.5));
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 968px) {
    .login-card {
        flex-direction: column;
        max-width: 500px;
    }
    
    .card-image-wrapper {
        min-height: 300px;
        order: -1;
    }
    
    .card-content-wrapper {
        padding: 2rem;
    }
    
    .card-header {
        text-align: center;
    }
    
    .logo-container {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .login-card {
        border-radius: 20px;
        max-width: 100%;
    }
    
    .card-title {
        font-size: 2rem;
    }
    
    .card-content-wrapper {
        padding: 1.5rem;
    }
    
    .card-image-wrapper {
        min-height: 250px;
    }
    
    .submit-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .value-props {
        margin: 1rem 0 1.5rem 0;
        padding: 1rem;
    }
    
    .prop-text {
        font-size: 0.85rem;
    }
    
    /* Reduce orb sizes on mobile */
    .orb-1 {
        width: 250px;
        height: 250px;
    }
    
    .orb-2 {
        width: 200px;
        height: 200px;
    }
    
    .orb-3 {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }
    
    .card-content-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .card-title {
        font-size: 1.75rem;
    }
    
    .card-image-wrapper {
        min-height: 200px;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .value-props {
        padding: 0.875rem;
        margin: 0.875rem 0 1.25rem 0;
    }
    
    .prop-item {
        gap: 0.5rem;
        margin-bottom: 0.625rem;
    }
    
    .prop-text {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.submit-button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.social-icon:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .orb {
        animation: none;
        opacity: 0.2;
    }
    
    .particle {
        display: none;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   Z-INDEX MANAGEMENT
   ============================================ */

.animated-background { z-index: 0; }
.video-background { z-index: 0; }
.orb { z-index: 1; }
.particles { z-index: 1; }
.login-container { z-index: 10; }