/* TCG Login Page Styles - Modern & Professional Design */
:root {
    /* Primary Colors */
    --primary-dark: #044EA3;
    --accent-blue-light: #4DA6FC;
    --background-white: #FFFFFF;
    
    /* Grays */
    --light-gray: #F4F6F8;
    --gray: #E1E4E8;
    --dark-gray: #6B7280;
    --off-white: #FAFBFC;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #044EA3 0%, #4DA6FC 100%);
    --gradient-hero: linear-gradient(180deg, #FFFFFF 0%, #F8F9FF 100%);
    --gradient-subtle: linear-gradient(135deg, #4DA6FC 0%, #FFFFFF 100%);
    
    /* Shadows */
    --shadow-soft: 0 2px 4px rgba(4, 78, 163, 0.05);
    --shadow-medium: 0 4px 12px rgba(4, 78, 163, 0.08);
    --shadow-large: 0 10px 30px rgba(4, 78, 163, 0.12);
    --shadow-extra-large: 0 20px 50px rgba(4, 78, 163, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #FFFFFF;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #1a1a1a;
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(77, 166, 252, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(4, 78, 163, 0.03) 0%, transparent 50%);
    z-index: 0;
}

/* Background Elements - Very Subtle */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

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

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(77, 166, 252, 0.3);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: rgba(4, 78, 163, 0.2);
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(77, 166, 252, 0.25);
    top: 50%;
    right: 10%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.05);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.95);
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* Login Card */
.login-card {
    background: var(--background-white);
    border-radius: 20px;
    box-shadow: var(--shadow-extra-large);
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(225, 228, 232, 0.6);
}

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

/* Login Header */
.login-header {
    background: var(--background-white);
    padding: 40px 40px 24px;
    text-align: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: auto;
    width: 100%;
    max-width: 280px;
    object-fit: contain;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-header p {
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 300;
    margin: 0;
    line-height: 1.5;
}

/* Login Form Container */
.login-form-container {
    padding: 24px 40px 40px;
    background: var(--background-white);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
}

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

.input-container i {
    position: absolute;
    left: 1rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-container input:focus ~ i {
    color: var(--accent-blue-light);
}

.input-container input {
    width: 100%;
    padding: 16px 2.75rem 16px 2.75rem;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--background-white);
    color: #1a1a1a;
    font-weight: 400;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.input-container input:focus {
    outline: none;
    border-color: var(--accent-blue-light);
    box-shadow: 0 0 0 3px rgba(77, 166, 252, 0.1);
}

.input-container input::placeholder {
    color: #9CA3AF;
    font-weight: 300;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.toggle-password:hover {
    color: var(--accent-blue-light);
    background: rgba(77, 166, 252, 0.08);
}

.toggle-password i {
    position: static;
    font-size: 1rem;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 0.25rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--dark-gray);
    cursor: pointer;
    position: relative;
    font-weight: 400;
}

.remember-me input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--background-white);
}

.remember-me:hover .checkmark {
    border-color: var(--accent-blue-light);
}

.remember-me input[type="checkbox"]:checked + .checkmark {
    background: var(--accent-blue-light);
    border-color: var(--accent-blue-light);
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--accent-blue-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Login Button */
.login-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 0.75rem;
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.2);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(4, 78, 163, 0.3);
}

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

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

.login-btn .btn-text,
.login-btn .btn-loader {
    position: relative;
    z-index: 1;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray);
}

.login-footer p {
    font-size: 0.875rem;
    color: var(--dark-gray);
    font-weight: 400;
    line-height: 1.5;
}

.login-footer a {
    color: var(--accent-blue-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-large);
    min-width: 300px;
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.message.success {
    background: rgba(240, 253, 244, 0.95);
    color: #166534;
    border-color: #86efac;
}

.message.error {
    background: rgba(254, 242, 242, 0.95);
    color: #dc2626;
    border-color: #fca5a5;
}

.message.info {
    background: rgba(239, 246, 255, 0.95);
    color: #1d4ed8;
    border-color: #93c5fd;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .login-card {
        border-radius: 16px;
    }
    
    .login-header {
        padding: 32px 24px 24px;
    }
    
    .login-form-container {
        padding: 24px;
    }
    
    .logo-img {
        max-width: 240px;
    }
    
    .login-header p {
        font-size: 0.8125rem;
    }
    
    .message-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .message {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }
    
    .login-header {
        padding: 28px 20px 20px;
    }
    
    .login-form-container {
        padding: 20px;
    }
    
    .logo-img {
        max-width: 200px;
    }
    
    .form-group label {
        font-size: 0.8125rem;
    }
    
    .input-container input {
        padding: 14px 2.5rem 14px 2.5rem;
        font-size: 15px;
    }
    
    .login-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .login-footer p {
        font-size: 0.8125rem;
    }
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Focus states for accessibility */
.login-btn:focus-visible {
    outline: 2px solid var(--accent-blue-light);
    outline-offset: 3px;
}

.input-container input:focus-visible {
    outline: none;
}

.remember-me:focus-within .checkmark {
    box-shadow: 0 0 0 3px rgba(77, 166, 252, 0.2);
}

.forgot-password:focus-visible {
    outline: 2px solid var(--accent-blue-light);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Text selection */
::selection {
    background: var(--accent-blue-light);
    color: white;
}

::-moz-selection {
    background: var(--accent-blue-light);
    color: white;
}

/* Loading state improvements */
.login-btn:disabled .btn-text {
    opacity: 0;
}

.login-btn:disabled .btn-loader {
    display: flex !important;
}

/* ============================================ */
/* Microsoft Sign-In Button Styles */
/* ============================================ */

.login-description {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-description p {
    font-size: 0.9375rem;
    color: var(--dark-gray);
    font-weight: 400;
    line-height: 1.6;
}

.ms-login-btn {
    width: 100%;
    background: white;
    color: #5e5e5e;
    border: 2px solid #8c8c8c;
    border-radius: 2px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', 'Plus Jakarta Sans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ms-login-btn:hover {
    background: #f3f2f1;
    border-color: #8c8c8c;
}

.ms-login-btn:active {
    background: #edebe9;
}

.ms-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ms-btn-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-icon {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}

.ms-login-btn .btn-text {
    font-weight: 600;
    letter-spacing: 0.2px;
}

.ms-login-btn .btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ms-login-btn:disabled .ms-btn-content {
    opacity: 0;
}

.ms-login-btn:disabled .btn-loader {
    display: flex !important;
}

.ms-login-btn:disabled .btn-loader i {
    color: #5e5e5e;
}

.login-divider {
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
}

.login-divider span {
    font-size: 0.8125rem;
    color: var(--dark-gray);
    font-weight: 400;
    padding: 0 0.75rem;
    background: white;
    position: relative;
    z-index: 1;
}

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

/* Focus state for accessibility */
.ms-login-btn:focus-visible {
    outline: 2px solid #605e5c;
    outline-offset: 2px;
}

/* Responsive adjustments for MS button */
@media (max-width: 480px) {
    .ms-login-btn {
        padding: 11px 14px;
        font-size: 14px;
    }
    
    .ms-icon {
        width: 19px;
        height: 19px;
    }
    
    .login-description p {
        font-size: 0.875rem;
    }
}
