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

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: linear-gradient(135deg, #d0e5f0 0%, #a8cfe5 25%, #7ab8db 50%, #c0d5e8 75%, #f0e0e0 100%);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    background: transparent;
    overflow: hidden;
}

/* Decorative glass shapes */
.glass-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(270deg);
    }
}

.shape1 {
    width: 700px;
    height: 700px;
    top: -150px;
    right: -150px;
    background: linear-gradient(135deg, rgba(100, 160, 210, 0.4) 0%, rgba(130, 180, 220, 0.3) 100%);
    backdrop-filter: blur(60px);
    animation-delay: 0s;
}

.shape2 {
    width: 650px;
    height: 650px;
    bottom: -200px;
    left: -100px;
    background: linear-gradient(135deg, rgba(70, 130, 190, 0.45) 0%, rgba(90, 150, 210, 0.35) 100%);
    backdrop-filter: blur(60px);
    animation-delay: -5s;
}

.shape3 {
    width: 180px;
    height: 180px;
    top: 52%;
    right: 25%;
    background: linear-gradient(135deg, rgba(240, 180, 180, 0.4) 0%, rgba(250, 200, 200, 0.3) 100%);
    backdrop-filter: blur(30px);
    box-shadow: 0 20px 60px rgba(200, 150, 150, 0.15);
    animation-delay: -10s;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Glass card */
.glass-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(25px);
    border-radius: 32px;
    padding: 50px 45px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 60px rgba(100, 150, 200, 0.15);
    max-width: 580px;
    width: 100%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.8s ease-out;
}

.forgotpassword-glass-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(25px);
    border-radius: 32px;
    padding: 50px 45px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 60px rgba(100, 150, 200, 0.15);
    max-width: 580px;
    width: 100%;
    min-height: 510px;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.8s ease-out;
}

/* Alert styling */
.alert {
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

.alert-error {
    background: rgba(220, 38, 38, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 14px;
}

.alert-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
}

.alert-message {
    color: #991b1b;
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
}

.alert-close {
    background: none;
    border: none;
    color: #991b1b;
    cursor: pointer;
    font-size: 20px;
    padding: 0 6px;
    transition: opacity 0.2s;
    flex-shrink: 0;
    margin-left: 10px;
}

.alert-close:hover {
    opacity: 0.7;
}

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

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

/* Header Section */
.subtitle {
    font-size: 48px;
    font-weight: 600;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.description {
    margin: 5px 0 20px;
    opacity: 0.8;
    font-size: 16px;
    color: #0f2d44;
}

/* Form Section */
.login-form {
    margin-top: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 16px;
}

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

.input-wrapper input {
    width: 100%;
    font-size: 14px;
}

#togglePassword {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #007bff;
    font-size: 14px;
    cursor: pointer;
}

input {
    width: 100%;
    padding: 16px 22px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #0f2d44;
}

input:focus {
    outline: none;
    border-color: #1e40af;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.12);
    transform: translateY(-2px);
}

input::placeholder {
    color: #4a6a7a;
}

.forgot-password {
    text-align: right;
    margin-top: 10px;
}

.forgot-password a {
    color: #3a00ff;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Button Section */
.button-section {
    margin-top: 24px;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

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

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0 20px;
    color: #4a6a7a;
    font-size: 13px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(74, 106, 122, 0.3), transparent);
}

.divider span {
    padding: 0 16px;
    white-space: nowrap;
}

/* Contact Card */
.contact-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(100, 150, 200, 0.15);
}

.contact-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f2d44;
    margin-bottom: 6px;
}

.contact-card-subtitle {
    font-size: 13px;
    color: #4a6a7a;
    margin-bottom: 14px;
}

.contact-methods {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(30, 64, 175, 0.3);
    background: rgba(255, 255, 255, 0.6);
    color: #1e40af;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.contact-btn:hover {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
    transform: scale(1.05);
}

/* Social Login Separator */
.sep {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #4a6a7a;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    justify-content: center;
}

.sep::before,
.sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(74, 106, 122, 0.3), transparent);
    max-width: 100px;
}

.sep span {
    padding: 0 16px;
    white-space: nowrap;
}

/* Social Login Buttons */
.socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 24px;
}

.icon-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
    fill: #0f2d44;
}

.icon-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.icon-btn:hover svg {
    fill: #fff;
}

/* Responsive Design */

/* Large Tablets and Small Desktops (1024px - 1200px) */
@media (max-width: 1200px) {
    .shape1 {
        width: 600px;
        height: 600px;
    }
    .shape2 {
        width: 550px;
        height: 550px;
    }
    .shape3 {
        width: 150px;
        height: 150px;
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 30px 20px;
    }
    .glass-card {
        padding: 40px 35px;
        max-width: 520px;
    }
    .forgotpassword-glass-card {
        padding: 40px 35px;
        max-width: 520px;
        min-height: 480px;
    }
    .subtitle {
        font-size: 42px;
    }
    .shape1 {
        width: 500px;
        height: 500px;
        top: -100px;
        right: -100px;
    }
    .shape2 {
        width: 450px;
        height: 450px;
        bottom: -150px;
        left: -80px;
    }
    .shape3 {
        width: 120px;
        height: 120px;
        top: 50%;
        right: 20%;
    }
}

/* Small Tablets and Large Phones (600px - 768px) */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }
    .container {
        padding: 20px 15px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 40px;
    }
    .glass-card {
        padding: 35px 28px;
        min-height: auto;
        border-radius: 24px;
        margin: 0 auto;
    }
    .forgotpassword-glass-card {
        padding: 35px 28px;
        min-height: auto;
        border-radius: 24px;
        margin: 0 auto;
    }
    .subtitle {
        font-size: 36px;
        letter-spacing: -0.5px;
    }
    .description {
        font-size: 15px;
    }
    input {
        padding: 14px 18px;
        font-size: 16px;
    }
    .btn-primary {
        padding: 15px;
        font-size: 16px;
    }
    .contact-methods {
        flex-direction: column;
        gap: 8px;
    }
    .contact-btn {
        width: 100%;
        padding: 12px 20px;
    }
    .shape1 {
        width: 400px;
        height: 400px;
        top: -80px;
        right: -120px;
    }
    .shape2 {
        width: 350px;
        height: 350px;
        bottom: -100px;
        left: -100px;
    }
    .shape3 {
        width: 100px;
        height: 100px;
        top: 40%;
        right: 10%;
    }
    .divider {
        margin: 20px 0 16px;
    }
    .form-group {
        margin-bottom: 14px;
    }
    .button-section {
        margin-top: 20px;
    }
    .sep {
        margin: 16px 0;
    }
    .socials {
        gap: 10px;
        margin: 12px 0 20px;
    }
    .icon-btn {
        width: 44px;
        height: 44px;
    }
    .icon-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* Mobile Phones (480px - 600px) */
@media (max-width: 600px) {
    .container {
        padding: 15px 12px;
        padding-top: 30px;
    }
    .glass-card {
        padding: 30px 24px;
        border-radius: 20px;
    }
    .subtitle {
        font-size: 32px;
    }
    .description {
        font-size: 14px;
        margin-bottom: 16px;
    }
    .alert-message {
        font-size: 13px;
    }
    .alert-content {
        padding: 12px 15px;
    }
    .shape1,
    .shape2 {
        display: none;
    }
    .shape3 {
        width: 80px;
        height: 80px;
        top: 30%;
        right: 5%;
    }
    .sep {
        margin: 14px 0;
        font-size: 12px;
    }
    .socials {
        gap: 8px;
        margin: 10px 0 16px;
    }
    .icon-btn {
        width: 40px;
        height: 40px;
    }
    .icon-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Very Small Phones (320px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
        padding-top: 20px;
    }
    .glass-card {
        padding: 25px 20px;
        border-radius: 18px;
        backdrop-filter: blur(20px);
    }
    .subtitle {
        font-size: 28px;
        letter-spacing: -0.3px;
    }
    .description {
        font-size: 13px;
    }
    input {
        padding: 13px 16px;
        font-size: 16px;
        border-radius: 12px;
    }
    .btn-primary {
        padding: 14px;
        font-size: 15px;
        border-radius: 12px;
    }
    .contact-card {
        padding: 16px;
        border-radius: 14px;
    }
    .contact-card-title {
        font-size: 13px;
    }
    .contact-card-subtitle {
        font-size: 12px;
        margin-bottom: 12px;
    }
    .contact-btn {
        padding: 10px 16px;
        font-size: 12px;
        border-radius: 8px;
    }
    .divider {
        font-size: 12px;
        margin: 18px 0 14px;
    }
    .divider span {
        padding: 0 12px;
    }
    .form-group {
        margin-bottom: 12px;
    }
    .button-section {
        margin-top: 18px;
    }
    .alert-close {
        font-size: 18px;
    }
    .sep {
        margin: 12px 0;
        font-size: 12px;
    }
    .socials {
        gap: 6px;
        margin: 8px 0 14px;
    }
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    .icon-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Extra Small Phones (below 360px) */
@media (max-width: 360px) {
    .subtitle {
        font-size: 26px;
    }
    .glass-card {
        padding: 20px 16px;
    }
    input {
        padding: 12px 14px;
        font-size: 15px;
    }
    .btn-primary {
        padding: 13px;
        font-size: 14px;
    }
    .sep {
        font-size: 11px;
    }
    .socials {
        gap: 5px;
    }
    .icon-btn {
        width: 34px;
        height: 34px;
    }
    .icon-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        padding: 15px;
        align-items: flex-start;
    }
    .glass-card {
        min-height: auto;
        padding: 25px 30px;
        margin: 20px auto;
    }
    .forgotpassword-glass-card {
        min-height: auto;
        padding: 25px 30px;
        margin: 20px auto;
    }
    .subtitle {
        font-size: 28px;
        margin-bottom: 6px;
    }
    .description {
        margin: 4px 0 12px;
    }
    .login-form {
        margin-top: 12px;
    }
    .form-group {
        margin-bottom: 10px;
    }
    .input {
        padding: 12px 16px;
    }
    .btn-primary {
        padding: 12px;
    }
    .divider {
        margin: 12px 0 10px;
    }
    .contact-card {
        padding: 14px;
    }
    .shape1,
    .shape2,
    .shape3 {
        display: none;
    }
    .sep {
        margin: 10px 0;
    }
    .socials {
        margin: 8px 0 10px;
    }
}

/* Print styles */
@media print {
    .glass-shape {
        display: none;
    }
    .container {
        background: white;
    }
    .glass-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}/* Base styles for help-bubble */
.help-bubble {
    position: fixed;
    top: clamp(8px, 2vw, 12px);
    right: clamp(8px, 2vw, 12px);
    width: clamp(30px, 7.5vw, 36px); /* Adjusted for better fit */
    height: clamp(30px, 7.5vw, 36px);
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b3b72;
    text-decoration: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    font-weight: 700;
    font-size: clamp(12px, 3.5vw, 16px);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Tooltip visibility on hover */
.help-bubble:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    right: 0;
    background: #0b3b72;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: clamp(10px, 2.5vw, 12px);
    white-space: nowrap;
    z-index: 1001;
    margin-top: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Guest (Not Logged In) Layout Adjustments */
body:not(.logged-in) .main-layout {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f9fafb;
    width: 100vw; /* Full viewport width */
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

body:not(.logged-in) .content-area {
    width: 100%;
    max-width: min(960px, 92vw); /* Slightly reduced to ensure fit */
    min-width: 280px; /* Prevent content from becoming too thin */
    margin: 0 auto;
    padding: clamp(10px, 3vw, 16px);
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

body:not(.logged-in) .guest-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    padding: clamp(12px, 3.5vw, 20px) clamp(16px, 4vw, 24px);
    width: 100%;
    max-width: 100%; /* Ensure it stays within content-area */
    min-width: 260px; /* Prevent overly thin content */
    box-sizing: border-box;
}

/* Tablet and Mobile (≤768px) */
@media (max-width: 768px) {
    .help-bubble {
        top: 6px;
        right: 6px;
        width: clamp(26px, 6.5vw, 32px);
        height: clamp(26px, 6.5vw, 32px);
        font-size: clamp(11px, 3vw, 14px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    }
    .help-bubble:hover::after {
        font-size: clamp(9px, 2.3vw, 11px);
        padding: 3px 8px;
    }
    body:not(.logged-in) .main-layout {
        padding: 0 8px; /* Add minimal padding to avoid edge clipping */
    }
    body:not(.logged-in) .content-area {
        max-width: 95vw; /* Use more viewport width */
        min-width: 240px; /* Slightly smaller minimum width */
        padding: clamp(8px, 2.5vw, 12px);
    }
    body:not(.logged-in) .guest-wrapper {
        padding: clamp(10px, 3vw, 16px) clamp(12px, 3.5vw, 20px);
        border-radius: 10px;
        min-width: 220px;
    }
}

/* Ultra-small screens (≤480px) */
@media (max-width: 480px) {
    .help-bubble {
        top: 4px;
        right: 4px;
        width: clamp(22px, 6vw, 28px);
        height: clamp(22px, 6vw, 28px);
        font-size: clamp(10px, 2.8vw, 12px);
        box-shadow: 0 2px 3px rgba(0,0,0,0.06);
    }
    .help-bubble:hover::after {
        font-size: clamp(8px, 2.2vw, 10px);
        padding: 2px 6px;
        margin-top: 4px;
    }
    body:not(.logged-in) .main-layout {
        padding: 0 4px;
        overflow-x: hidden;
    }
    body:not(.logged-in) .content-area {
        max-width: 98vw; /* Maximize usable width */
        min-width: 200px; /* Ensure content isn’t too thin */
        padding: clamp(6px, 2vw, 10px);
    }
    body:not(.logged-in) .guest-wrapper {
        padding: clamp(8px, 2.5vw, 12px) clamp(10px, 3vw, 16px);
        border-radius: 8px;
        min-width: 180px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    }
}

/* Ultra-wide screens (≥2560px) */
@media (min-width: 2560px) {
    .help-bubble {
        width: clamp(36px, 1.5vw, 42px);
        height: clamp(36px, 1.5vw, 42px);
        font-size: clamp(16px, 1.2vw, 18px);
    }
    body:not(.logged-in) .content-area {
        max-width: 1000px; /* Reduced cap for better readability */
        padding: clamp(20px, 2vw, 24px);
    }
    body:not(.logged-in) .guest-wrapper {
        padding: clamp(20px, 2vw, 24px) clamp(24px, 2.5vw, 32px);
        border-radius: 16px;
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .help-bubble, body:not(.logged-in) .main-layout {
        transition: none;
    }
}