/*
 * CAB Unified Login Styles
 * Cricket Association of Bengal
 */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #fbbf24;
    --light-blue: #e0f2fe;
    --gradient-bg: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

body {
    background: var(--gradient-bg);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-attachment: fixed;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
}

.login-header {
    background: var(--gradient-bg);
    color: white;
    padding: 30px 30px 20px;
    text-align: center;
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid var(--secondary-color);
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.login-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.login-subtitle {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.login-body {
    padding: 40px 30px 30px;
}

.form-floating {
    margin-bottom: 20px;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(251, 191, 36, 0.25);
    background-color: white;
}

.form-floating > label {
    color: #666;
    padding-left: 16px;
}

.btn-primary {
    background: var(--gradient-bg);
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.otp-section {
    display: none;
    animation: slideIn 0.5s ease;
}

.otp-input {
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.5rem;
    font-weight: 600;
}

.timer {
    text-align: center;
    margin-top: 15px;
    color: var(--secondary-color);
    font-weight: 600;
}

.role-indicator {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.role-admin { background: rgba(220, 53, 69, 0.1); color: #dc3545; }
.role-club { background: rgba(13, 110, 253, 0.1); color: #0d6efd; }
.role-player { background: rgba(25, 135, 84, 0.1); color: #198754; }

.alert {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: none;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-container {
        padding: 10px;
    }

    .login-card {
        max-width: 100%;
        border-radius: 15px;
    }

    .login-body {
        padding: 30px 20px 20px;
    }

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

    .logo i {
        font-size: 1.5rem;
    }

    .login-title {
        font-size: 1.3rem;
    }

    .login-subtitle {
        font-size: 0.8rem;
    }

    /* Fix for long label text on mobile */
    .form-floating > label {
        font-size: 0.85rem;
        line-height: 1.2;
        max-width: 90%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Alternative: Show shorter label on mobile */
    #mobileSection .form-floating > label {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .login-header {
        padding: 25px 25px 15px;
    }
}

/* Resend OTP functionality */
.resend-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.resend-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
    background: rgba(251, 191, 36, 0.1);
}

.resend-link:disabled,
.resend-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.timer.warning {
    color: #ffc107 !important;
}

.timer.danger {
    color: #dc3545 !important;
}

/* Modern Toast Notifications */
.toast-container {
    z-index: 1060;
}

.toast {
    min-width: 300px;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem;
}

.toast-body {
    padding: 0.75rem;
    font-weight: 500;
}