/* Login Page Specific Styles - MODERN REDESIGN */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative; height:100vh;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 20%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Login Container */
.login-container {
    min-height: 100vh;
    min-height: 100dvh; /* Mobile viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 1s ease-out;
}

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

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 500px;/*440*/
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.login-card:hover::before {
    left: 100%;
}

/* Logo Section */
.logo-section {
    margin-bottom: 40px;
    position: relative;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    position: relative;
    z-index: 2;
    animation: bounce 2s ease-in-out infinite;
}

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

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.5;
    }
}

.logo-section h1 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 2.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: #7f8c8d;
    margin: 0;
    font-size: 1em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Login Form */
.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 25px; /* 25px*/
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group input {
    width: 100%;
    padding: 16px 50px 16px 16px; /* 16,50,16,16*/
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #f8f9fa;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.form-group input:valid {
    border-color: #27ae60;
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

.input-icon {
    position: absolute;
    right: 16px;
    font-size: 1.2em;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.form-group input:focus + .input-icon {
    opacity: 1;
    transform: scale(1.1);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 8px;
    display: block;
    min-height: 15px;
    font-weight: 500;
    animation: shake 0.5s ease-in-out; /*0.5s*/
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(8px); }
}

/* Buttons */
.login-btn, .register-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

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

.register-btn {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    margin-top: 15px;
}

.register-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Quick Links */
.quick-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e8ecf1;
}

.quick-link {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-link:hover {
    color: #667eea;
    transform: translateY(-1px);
}

.divider {
    color: #bdc3c7;
    font-weight: 300;
}

/* Footer */
.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 10px 0px ;/*20,0*/
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content p {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 0.85em;
    font-weight: 500;
}

.footer-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.footer-links {
    font-size: 0.8em;
}

.footer-links a {
    color: #7f8c8d;
    text-decoration: none;
    margin: 0 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
    transform: translateY(-1px);
}

/* Responsive Design - MOBILE FIRST */
@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .login-container {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 20px 5px 0px;/*15*/
        align-items: stretch;
        border-radius: 12px;
        bottom: 0;
    }

    .login-card {
        padding: 40px 25px;
        margin: 0;
        border-radius: 0;
        max-width: none;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: none;
        animation: mobileSlideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    @keyframes mobileSlideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .logo {
        width: 90px;
        height: 90px;
    }

    .logo-section h1 {
        font-size: 2.2em;
    }

    .tagline {
        font-size: 0.95em;
    }

    .form-group input {
        padding: 18px 50px 18px 18px; /*18,50,18,18*/
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .login-btn, .register-btn {
        padding: 18px;
        font-size: 1.1em;
    }

    .quick-links {
        flex-direction: column;
        gap: 12px;
    }

    .divider {
        display: none;
    }

    .login-footer {
        position: relative;
        background: transparent;
        backdrop-filter: none;
        padding: 0px 15px; /*10,15*/
        margin-top: auto;
    }

    .footer-content p {
        font-size: 0.8em;
        line-height: 1.4;
    }

    .footer-links {
        font-size: 0.75em;
    }

    /* Hide animated background on mobile for performance */
    .animated-bg {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 35px 20px;
    }

    .logo {
        width: 70px;
        height: 70px;
    }

    .logo-section h1 {
        font-size: 2em;
    }

    .form-group input {
        padding: 16px 45px 16px 16px;
    }

    .login-btn, .register-btn {
        padding: 16px;
    }

    .quick-links {
        margin-top: 20px;
        padding-top: 20px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .login-card {
        padding: 30px 15px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .logo-section h1 {
        font-size: 1.8em;
    }

    .tagline {
        font-size: 0.9em;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(45, 45, 45, 0.95);
    }

    .logo-section h1 {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .form-group label {
        color: #ecf0f1;
    }

    .form-group input {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #ecf0f1;
    }

    .form-group input:focus {
        background: rgba(255, 255, 255, 0.15);
    }

    .quick-links {
        border-top-color: rgba(255, 255, 255, 0.1);
    }

    .login-footer {
        background: rgba(45, 45, 45, 0.95);
    }

    .footer-content p {
        color: #ecf0f1;
    }
    }
