@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');
/* Gateway Portal Global Styles */

.gateway-container {
    font-family: 'Cairo', sans-serif;
    min-height: 100vh;
    background: var(--page-bg, #0f172a);
    background-image: var(--bg-gradient);
    position: relative;
    overflow-x: hidden;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    color: var(--text-main, #ffffff);
    transition: background-image 0.5s ease;
}

/* Background Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
    animation: move 20s infinite alternate;
    transition: background 0.5s ease;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--blob-1-color, #3b82f6);
    top: -200px;
    right: -200px;
    filter: blur(120px);
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--blob-2-color, #8b5cf6);
    bottom: -200px;
    left: -200px;
    animation-delay: -5s;
    filter: blur(120px);
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--blob-3-color, #ec4899);
    top: 40%;
    left: 20%;
    animation-delay: -10s;
    filter: blur(120px);
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 100px) scale(1.1);
    }
}

/* Header */
.gateway-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    background: var(--header-bg, rgba(255, 255, 255, 0.03));
    padding: 1.5rem 2.5rem;
    border-radius: 30px;
    border: 1px solid var(--header-border, rgba(255, 255, 255, 0.1));
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    box-shadow: var(--header-shadow, 0 20px 50px rgba(0, 0, 0, 0.3));
}

.logo-area h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-main, #ffffff);
    margin: 0;
    line-height: 1;
    text-shadow: var(--logo-glow);
}

.logo-area h1 span {
    color: var(--logo-accent, #3b82f6);
    font-weight: 400;
    margin-right: 4px;
}

.logo-area p {
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-size: 0.95rem;
    margin: 8px 0 0 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.theme-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0;
    /* Remove padding as button handles it */
    background: transparent;
    /* Remove wrapper background */
    border: none;
}

.theme-trigger-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-trigger-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-trigger-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.6);
}

.theme-trigger-btn:hover::before {
    opacity: 0.2;
}

.theme-icon {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.theme-trigger-btn span {
    position: relative;
    z-index: 1;
}



.user-peek {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-text {
    background: var(--pill-bg, rgba(255, 255, 255, 0.05));
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--pill-border, rgba(255, 255, 255, 0.1));
    font-size: 0.9rem;
    color: var(--pill-text, rgba(255, 255, 255, 0.8));
}

.profile-link {
    font-size: 2rem;
    color: var(--text-main, #ffffff);
    transition: transform 0.3s ease;
}

.profile-link:hover {
    transform: scale(1.1);
}

.login-btn {
    background: var(--accent-gradient);
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Grid */
.gateway-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    flex-grow: 1;
    justify-content: center;
    align-content: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Cards */
.module-card {
    padding: 3.5rem;
    border-radius: 40px;
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    background: var(--card-bg, rgba(255, 255, 255, 0.03));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

.module-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--card-hover-border);
    background: var(--card-hover-bg);
}

.active-focus {
    border: 2px solid var(--accent, #3b82f6);
    box-shadow: 0 0 30px var(--accent, rgba(59, 130, 246, 0.3));
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.03);
}

.active-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent, #3b82f6);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card-icon {
    font-size: 3.5rem;
    color: var(--text-main, #ffffff);
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.module-card:hover .card-icon {
    transform: scale(1.1) rotate(8deg);
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: var(--card-icon-hover-shadow);
}

.module-card h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main, #ffffff);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.module-card p {
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.btn-portal {
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    background-size: 200% auto;
    color: #ffffff;
    box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-3px);
}

.btn-admin {
    background: var(--btn-admin-bg, rgba(255, 255, 255, 0.05));
    color: var(--btn-admin-text, rgba(255, 255, 255, 0.7));
    border: 1px solid var(--btn-admin-border, rgba(255, 255, 255, 0.1));
}

.btn-admin:hover {
    background: var(--btn-admin-hover-bg);
    border-color: var(--btn-admin-hover-border);
    color: var(--btn-admin-hover-text);
    transform: translateY(-3px);
    box-shadow: var(--btn-admin-hover-shadow);
}

/* Footer */
.gateway-footer {
    position: relative;
    z-index: 10;
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* Responsive */
@media (max-width: 768px) {
    .gateway-header {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .card-actions {
        flex-direction: column;
    }
}

/* Registration Links Styling */
.registration-links {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.registration-links span {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.register-badges {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.register-badges a {
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.register-badges a i {
    font-size: 0.9rem;
}

/* Specific Badge Colors mapping to registration page themes */
.register-badges a[href*="teacher"] {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.register-badges a[href*="student"] {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.register-badges a[href*="admin"] {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
}


/* Theme Modal Styles */
.theme-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.theme-modal-content {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.theme-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.theme-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.theme-card.active {
    border: 2px solid #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.theme-preview {
    height: 100px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.check-icon {
    font-size: 2rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-name {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}