/* Authentication Page Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Auth Outer Container */
.auth-outer-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 50%, #1f4e79 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Background Effects */
.auth-outer-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.auth-outer-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="authGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23authGrid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Auth Container */
.auth-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 3.5rem;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 650px;
    position: relative;
    z-index: 2;
    animation: slideInUp 1s ease-out;
    transform: perspective(1000px) rotateX(5deg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateX(15deg) translateY(50px);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) rotateX(5deg) translateY(0);
    }
}

.auth-container:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-5px);
    box-shadow: 
        0 35px 100px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.3),
        inset 0 4px 8px rgba(255, 255, 255, 0.5);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.auth-form h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    text-shadow: 0 2px 8px rgba(44, 62, 80, 0.1);
}

.auth-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Form Inputs */
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form select {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 15px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(248, 249, 250, 0.8);
    color: #2c3e50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
}



.auth-form input::placeholder {
    color: #7f8c8d;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.auth-form input:focus::placeholder {
    opacity: 0.7;
}

/* Primary Button */
.auth-form .btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 18px 35px;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(52, 152, 219, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    margin-top: 1rem;
}

.auth-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.auth-form .btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(52, 152, 219, 0.4),
        inset 0 4px 8px rgba(255, 255, 255, 0.3);
}

.auth-form .btn:hover::before {
    left: 100%;
}

.auth-form .btn:active {
    transform: translateY(-1px);
}

/* Auth Links */
.auth-form p {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.auth-form a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-form a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
}

.auth-form a:hover {
    color: #2980b9;
    transform: translateY(-1px);
}

.auth-form a:hover::after {
    width: 100%;
}

/* Google Button */
.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: white;
    color: #2c3e50;
    padding: 16px 30px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    min-width: 240px;
    backdrop-filter: blur(10px);
}

.google-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(52, 152, 219, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.google-btn:hover::before {
    opacity: 1;
}

.google-btn:active {
    transform: translateY(-1px);
}

.google-btn img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.google-btn:hover img {
    transform: scale(1.1);
}

/* Divider */
.auth-container center {
    position: relative;
    margin-top: 2rem;
}

.auth-container center::before {
    content: 'OR';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #7f8c8d;
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.auth-container center::after {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
}

/* Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error Messages */
.error-message {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    animation: slideInDown 0.3s ease-out;
}

.success-message {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    animation: slideInDown 0.3s ease-out;
}

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

/* Floating Elements */
.auth-outer-container .floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.auth-outer-container .floating-element {
    position: absolute;
    opacity: 0.1;
    color: white;
    font-size: 1.5rem;
    animation: float3D 15s ease-in-out infinite;
}

.auth-outer-container .floating-element:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.auth-outer-container .floating-element:nth-child(2) {
    top: 70%;
    right: 15%;
    animation-delay: 5s;
}

.auth-outer-container .floating-element:nth-child(3) {
    bottom: 20%;
    left: 80%;
    animation-delay: 10s;
}

@keyframes float3D {
    0%, 100% {
        transform: translateY(0px) rotateZ(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-30px) rotateZ(90deg);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-15px) rotateZ(180deg);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-25px) rotateZ(270deg);
        opacity: 0.25;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-outer-container {
        padding: 1.5rem;
    }
    
    .auth-container {
        padding: 2.5rem;
        max-width: 100%;
        transform: none;
    }
    
    .auth-container:hover {
        transform: translateY(-5px);
    }
    
    .auth-form h2 {
        font-size: 2rem;
    }
    
    .auth-form input[type="email"],
    .auth-form input[type="password"],
    .auth-form input[type="text"] {
        padding: 15px 18px;
        font-size: 0.95rem;
    }
    
    .auth-form .btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .google-btn {
        padding: 14px 25px;
        font-size: 0.95rem;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .auth-outer-container {
        padding: 1rem;
    }
    
    .auth-container {
        padding: 2rem;
    }
    
    .auth-form h2 {
        font-size: 1.8rem;
    }
    
    .auth-form input[type="email"],
    .auth-form input[type="password"],
    .auth-form input[type="text"] {
        padding: 14px 16px;
    }
    
    .auth-form .btn {
        padding: 14px 25px;
    }
    
    .google-btn {
        padding: 12px 20px;
        min-width: 180px;
        font-size: 0.9rem;
    }
    
    .google-btn img {
        width: 18px;
        height: 18px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .auth-container {
        background: rgba(44, 62, 80, 0.95);
        color: white;
    }
    
    .auth-form h2 {
        color: white;
    }
    
    .auth-form input[type="email"],
    .auth-form input[type="password"],
    .auth-form input[type="text"] {
        background: rgba(52, 73, 94, 0.8);
        color: white;
        border-color: rgba(149, 165, 166, 0.3);
    }
    
    .auth-form input::placeholder {
        color: #bdc3c7;
    }
    
    .google-btn {
        background: rgba(52, 73, 94, 0.9);
        color: white;
        border-color: rgba(149, 165, 166, 0.3);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
.auth-form input:focus,
.auth-form .btn:focus,
.google-btn:focus {
    outline: 3px solid rgba(52, 152, 219, 0.5);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .auth-outer-container {
        background: white;
        min-height: auto;
    }
    
    .auth-container {
        box-shadow: none;
        border: 1px solid #ddd;
        transform: none;
    }
    
    .floating-elements {
        display: none;
    }
}