/* login.css */

/* Define CSS Variables */
:root {
    /* Theme Colors from Screenshot & App Style */
    --brand-logo-blue: #2A72D7;
    --brand-green-accent: #10b981; /* This will be less prominent on login now */
    --page-bg: #FFFFFF; /* Updated: from #F8F9FA to white */
    --text-primary: #333333;
    --text-secondary: #555555;
    --login-button-bg: var(--brand-logo-blue);
    --login-button-text: white;
    --particle-section-bg: #EBF4FF; /* Updated: Light blue */
    --particle-color: var(--brand-logo-blue); /* Updated: Brand blue for particles */
    --overlay-heading-color: var(--brand-logo-blue);
    --overlay-paragraph-color: #4A5568;

    /* Existing variables to review/integrate */
    --Background-Primary: var(--page-bg); /* Aliasing for potential existing use */
    --Background-Secondary-Invert: var(--text-primary);
    --Text-Icon-Element-Secondary-Invert: #A0A3A9; /* Kept for footer or minor elements, review if needed */
    --Coach-Green: var(--brand-green-accent); /* Updated to new accent green */
    --Button-Background: var(--login-button-bg); /* Aliasing for potential existing use */

    /* Fonts */
    --font-idt-sans: "IDT Sans", sans-serif;
    --font-poppins: "Poppins", sans-serif;
}

body {
    font-family: var(--font-idt-sans);
    line-height: 1.5;
}

/* Page Container Styles */
.page-container {
    max-width: 1440px;
    position: relative;
    background: var(--page-bg); /* Updated */
    margin: auto;
    display: flex;
    min-height: 90vh;
    margin-top: 2rem;
    margin-bottom: 0.4rem;
    border-radius: 16px;
}

/* Main Content Area */
.main-content {
    width: 100%;
    padding: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

/* Left Column: Login Section */
.login-section {
    flex: 1 1 0;
    align-self: stretch;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-form-container {
    width: 388px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 36px;
}

/* Header within the login form */
.login-header {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    gap: 16px;
    text-align: center;
}

/* Styles for the new logo */
.coach-logo {
    max-width: 400px;
    height: auto;
}

.tagline {
    align-self: stretch;
    color: var(--text-secondary); /* Updated */
    font-size: 18px;
    font-family: var(--font-idt-sans);
    font-weight: 450;
    line-height: 24px;
    word-wrap: break-word;
}

/* Login Button */
.login-button {
    align-self: stretch;
    height: 48px;
    padding: 16px 69px;
    background: var(--login-button-bg); /* Updated */
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: var(--login-button-text); /* Updated */
    font-family: var(--font-idt-sans);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
}

.login-logo-placeholder {
    display: inline-block;
    font-style: italic;
    color: var(--Logo-Placeholder-Color);
    font-size: 12px;
}

/* Help Text */
.help-text {
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-family: var(--font-idt-sans);
    font-weight: 450;
    line-height: 21px;
    word-wrap: break-word;
    color: var(--text-primary); /* Updated from --Background-Secondary-Invert */
}

.help-link {
    color: var(--brand-green-accent); /* Updated from --Coach-Green (which is now aliased) */
    text-decoration: none;
    font-weight: 450;
}

.help-link:hover {
    text-decoration: underline;
}

/* Footer Text */
.login-footer {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.login-footer p {
    color: var(--Text-Icon-Element-Secondary-Invert);
    font-size: 15px;
    font-family: var(--font-idt-sans);
    font-weight: 450;
    line-height: 20px;
    word-wrap: break-word;
    text-align: center;
}

/* Right Column: Image Section */
.image-section {
    flex: 1 1 0;
    align-self: stretch;
    position: relative;
    background: var(--Image-Section-Background);
    overflow: hidden;
    border-radius: 32px;
}

.image-section img {
    width: 496px;
    height: 324px;
    position: absolute;
    left: 97px;
    top: 218px;
}
.net2phone-logo {
    max-width: 150px;
    height: auto;
}
spline-viewer {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 16px;
}

/* Particles.js container */
#particles-js {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    border-radius: 32px;
    overflow: hidden;
    background-color: var(--particle-section-bg); /* Updated */
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 80%;
}

.overlay-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--overlay-heading-color); /* Updated */
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

.overlay-text p {
    font-size: 1.2rem;
    color: var(--overlay-paragraph-color); /* Updated */
    font-family: 'Poppins', sans-serif;
}

html.dark #particles-js {
    background-color: #1A4A8B; /* Updated: Dark blue for dark mode particle bg */
}

html.dark .overlay-text h2 {
    color: var(--brand-green-accent); /* Brighter green for heading in dark mode */
}

html.dark .overlay-text p {
    color: #a7f3d0; /* Lighter green/text for paragraph in dark mode */
}

/* Theme toggle button */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Icon styling */
.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: #4b5563;
}

html.dark .theme-toggle svg {
    color: #f3f4f6;
}

.dark-icon,
.light-icon {
    display: none;
}

html:not(.dark) .dark-icon {
    display: block;
}

html.dark .light-icon {
    display: block;
}

/* Dark mode overrides */
html.dark body {
    background-color: #111827; /* Keep dark background */
    color: #e5e7eb; /* Light gray text for dark mode */
}

html.dark .page-container {
    background-color: #111827;
}

html.dark .login-form-container {
    background-color: #111827;
}

html.dark .tagline {
    color: #d1d5db; /* Lighter gray for tagline in dark mode */
}

html.dark .login-button {
    background-color: var(--brand-logo-blue); /* Keep brand blue for button */
    border: 1px solid #1e40af; /* Darker blue border */
}

html.dark .help-text {
    color: #e5e7eb;
}

html.dark .help-link {
    color: var(--brand-green-accent);
}

html.dark .login-footer p {
    color: #9ca3af;
}

/* --- Responsive Design --- */

/* Tablets and smaller desktops */
@media (max-width: 1024px) {
    .page-container {
        width: 90%; /* Use percentage width */
        height: auto; /* Adjust height */
        margin-top: 2rem;
        margin-bottom: 0.4rem;
    }

    .main-content {
        padding: 24px;
        gap: 24px;
    }

    .login-form-container {
        width: auto; /* Allow flexible width */
        max-width: 400px; /* Limit max width */
        margin: 0 auto; /* Center if needed */
        gap: 20px;
    }

    .login-header {
        align-items: center;
        text-align: center;
    }

    .tagline {
        font-size: 16px; /* Slightly smaller tagline */
    }
    
    .image-section {
        /* Adjust image section styling if needed */
        border-radius: 24px;
    }
    
    .overlay-text h2 {
        font-size: 2rem;
    }
    
    .overlay-text p {
        font-size: 0.9rem;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .page-container {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    .main-content {
        flex-direction: column;
        padding: 20px;
        gap: 30px;
        align-items: stretch;
    }

    .login-section {
        order: 1;
        width: 100%;
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .login-form-container {
        width: 100%;
        max-width: none;
        gap: 20px;
        margin: 0 auto;
        align-items: stretch;
    }

    .login-header {
        align-items: center;
        text-align: center;
    }

    .tagline {
        font-size: 15px;
    }

    .login-button {
        padding: 14px 20px;
        font-size: 13px;
        align-self: stretch;
    }

    .login-footer {
        margin-top: 2rem;
        padding-bottom: 1rem;
    }

    .image-section {
        order: 2;
        display: none;
    }
}

/* Very small mobile devices (optional refinement) */
@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }
    
    .tagline {
        font-size: 14px;
    }

    .login-button {
        height: 44px;
    }
}

.error-message {
    align-self: stretch;
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}
