/* Modern Auth Page Styles */
:root {
    --auth-card-bg: rgba(255, 255, 255, 0.95);
    --auth-input-bg: rgba(255, 255, 255, 0.9);
    --auth-text-dark: #2c3e50;
    --auth-text-muted: #7f8c8d;
    --auth-border: rgba(0, 0, 0, 0.1);
    --auth-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --auth-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Auth Page Background */
.auth-modern-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), .8) 0%, var(--primary-color-hover) 100%);
    position: relative;
    overflow: hidden;
}

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

/* Modern Auth Container */
.auth-modern-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.auth-modern-card {
    background: var(--auth-card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--auth-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    box-sizing: border-box;
    margin: 0 auto;
}

.auth-modern-card:hover {
    box-shadow: var(--auth-shadow-hover);
    transform: translateY(-2px);
}

/* Logo Styling */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Title Styling */
.auth-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    color: var(--auth-text-dark);
    position: relative;
}

.auth-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    margin: 15px auto;
    border-radius: 2px;
}

/* Form Styling */
.auth-form {
    width: 100%;
}

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

.auth-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: 50px;
    background: var(--auth-input-bg);
    backdrop-filter: blur(10px);
    font-size: 16px;
    color: var(--auth-text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* Password input with toggle button */
.auth-input[type="password"],
.auth-input[data-has-toggle="true"] {
    padding-right: 55px;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 20px rgba(82, 196, 26, 0.15);
    transform: translateY(-1px);
}

.auth-input::placeholder {
    color: var(--auth-text-muted);
    transition: all 0.3s ease;
}

.auth-input:focus::placeholder {
    transform: translateY(-2px);
    opacity: 0.8;
}

/* Input Error State */
.auth-input.error {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.05);
}

/* Social Login Buttons */
.auth-social-section {
    margin-bottom: 30px;
}

.auth-social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.auth-social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.auth-social-btn.facebook {
    background: #3b5998;
}

.auth-social-btn.twitter {
    background: #1da1f2;
}

.auth-social-btn.google {
    background: #dd4b39;
}

.auth-social-btn.github {
    background: #333;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    background: var(--auth-card-bg);
    padding: 0 20px;
    color: var(--auth-text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* Checkbox Styling */
.auth-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
}

.auth-checkbox-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.auth-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--auth-border);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-checkbox-wrapper input[type="checkbox"]:checked + .auth-checkbox {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-checkbox-wrapper input[type="checkbox"]:checked + .auth-checkbox::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.auth-checkbox-label {
    font-size: 14px;
    color: var(--auth-text-muted);
    line-height: 1.5;
    cursor: pointer;
}

.auth-checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-checkbox-label a:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 16px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
    margin-bottom: 20px;
}

.auth-submit-btn:hover {
    background: var(--primary-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
}

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

/* Links */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-links a:hover {
    color: var(--primary-color-hover);
    text-decoration: underline;
}

.auth-links p {
    margin: 10px 0;
    color: var(--auth-text-muted);
    font-size: 14px;
}

/* Remember Me */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.auth-remember label {
    font-size: 14px;
    color: var(--auth-text-muted);
    cursor: pointer;
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-form-group:nth-child(1) { animation: slideInFromLeft 0.6s ease-out 0.1s both; }
.auth-form-group:nth-child(2) { animation: slideInFromLeft 0.6s ease-out 0.2s both; }
.auth-form-group:nth-child(3) { animation: slideInFromLeft 0.6s ease-out 0.3s both; }
.auth-form-group:nth-child(4) { animation: slideInFromLeft 0.6s ease-out 0.4s both; }

/* Responsive Design */
@media (max-width: 768px) {
    .auth-modern-container {
        padding: 15px;
    }

    .auth-modern-card {
        padding: 30px 25px;
        margin: 10px;
        border-radius: 15px;
        max-width: 100%;
    }

    .auth-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .auth-input {
        padding: 14px 18px;
        font-size: 15px;
    }

    .auth-input[type="password"],
    .auth-input[data-has-toggle="true"] {
        padding-right: 50px;
    }

    .auth-password-toggle {
        right: 15px;
        font-size: 14px;
        width: 28px;
        height: 28px;
    }

    .auth-submit-btn {
        padding: 14px 25px;
        font-size: 15px;
    }

    .auth-social-buttons {
        gap: 10px;
    }

    .auth-social-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .auth-checkbox-group {
        gap: 10px;
    }

    .auth-checkbox {
        width: 18px;
        height: 18px;
    }

    .auth-checkbox-label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .auth-modern-container {
        padding: 10px;
    }

    .auth-modern-card {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .auth-logo img {
        max-height: 60px;
    }

    .auth-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .auth-input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .auth-input[type="password"],
    .auth-input[data-has-toggle="true"] {
        padding-right: 45px;
    }

    .auth-password-toggle {
        right: 12px;
        font-size: 13px;
        width: 26px;
        height: 26px;
    }

    .auth-submit-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .auth-social-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .auth-checkbox {
        width: 16px;
        height: 16px;
    }

    .auth-checkbox-wrapper input[type="checkbox"]:checked + .auth-checkbox::after {
        font-size: 10px;
    }

    .auth-checkbox-label {
        font-size: 12px;
    }

    .auth-captcha .g-recaptcha {
        transform: scale(0.75);
    }
}

/* Loading State */
.auth-submit-btn.loading {
    position: relative;
    color: transparent;
}

.auth-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    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 */
.auth-error-message {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: fadeInUp 0.3s ease-out;
}

/* Success Messages */
.auth-success-message {
    background: rgba(82, 196, 26, 0.1);
    border: 1px solid rgba(82, 196, 26, 0.3);
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: fadeInUp 0.3s ease-out;
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.auth-password-toggle:hover {
    color: var(--primary-color);
    background: rgba(82, 196, 26, 0.1);
}

/* Captcha Styling */
.auth-captcha {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.auth-captcha .g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
    max-width: 100%;
}

/* Additional responsive fixes */
@media (max-width: 320px) {
    .auth-modern-container {
        padding: 5px;
    }

    .auth-modern-card {
        padding: 20px 15px;
        border-radius: 10px;
    }

    .auth-input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .auth-input[type="password"],
    .auth-input[data-has-toggle="true"] {
        padding-right: 40px;
    }

    .auth-password-toggle {
        right: 10px;
        font-size: 12px;
        width: 24px;
        height: 24px;
    }

    .auth-submit-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .auth-captcha .g-recaptcha {
        transform: scale(0.65);
    }
}

/* Landscape mobile fixes */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-modern-container {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .auth-modern-card {
        margin-top: 0;
        padding: 25px;
    }

    .auth-title {
        margin-bottom: 20px;
        font-size: 20px;
    }

    .auth-form-group {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .auth-captcha .g-recaptcha {
        transform: scale(0.75);
    }
}
