/* -------------------------------------------------------------
 * Modern Web Portal with CSS Animated Background
 * Based on: reactdeveloper22/CSS-Animated-Background
 * ------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #06080d;
    color: #f1f5f9;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* -------------------------------------------------------------
 * CSS Animated Background Waves & Gradients
 * ------------------------------------------------------------- */
.bg-wave {
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

.bg-wave1 {
    background-image: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.2) 0%, transparent 40%),
                      radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.2) 0%, transparent 40%);
    animation: waveAnimation1 18s ease-in-out infinite alternate;
}

.bg-wave2 {
    background-image: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.25) 0%, transparent 45%),
                      radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.2) 0%, transparent 45%);
    animation: waveAnimation2 24s ease-in-out infinite alternate;
}

.bg-wave3 {
    background-image: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: waveAnimation3 30s ease-in-out infinite alternate;
}

@keyframes waveAnimation1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, -8%) rotate(8deg); }
}

@keyframes waveAnimation2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(6%, 5%) rotate(-10deg); }
}

@keyframes waveAnimation3 {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* -------------------------------------------------------------
 * Pure CSS Drifting Particles
 * ------------------------------------------------------------- */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    animation: floatParticle linear infinite;
}

.particle:nth-child(1) { width: 4px; height: 4px; left: 15%; animation-duration: 15s; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; left: 35%; animation-duration: 22s; animation-delay: 2s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 60%; animation-duration: 18s; animation-delay: 4s; }
.particle:nth-child(4) { width: 5px; height: 5px; left: 80%; animation-duration: 25s; animation-delay: 1s; }
.particle:nth-child(5) { width: 4px; height: 4px; left: 90%; animation-duration: 20s; animation-delay: 3s; }

@keyframes floatParticle {
    0% { transform: translateY(105vh) scale(0.8); opacity: 0; }
    20% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

/* -------------------------------------------------------------
 * Main Glassmorphism Portal Card
 * ------------------------------------------------------------- */
.portal-card {
    width: 100%;
    max-width: 460px;
    background: rgba(15, 19, 28, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px 28px 24px 28px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 1px 1px rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

/* Header */
.portal-header {
    margin-bottom: 28px;
    text-align: left;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 16px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.portal-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.portal-header p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Services Grid */
.services-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.service-icon-bg {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-blue {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.icon-purple {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.service-info {
    flex: 1;
}

.service-info h2 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.service-info p {
    font-size: 13px;
    color: #94a3b8;
}

.service-arrow {
    color: #475569;
    transition: transform 0.2s ease, color 0.2s ease;
}

.service-item:hover .service-arrow {
    color: #f1f5f9;
    transform: translateX(4px);
}

/* Footer */
.portal-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.legal-links {
    font-size: 13px;
    color: #64748b;
}

.legal-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.legal-links a:hover {
    color: #ffffff;
}

.legal-links .bullet {
    margin: 0 8px;
    color: #334155;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-dialog {
    background: #0f1219;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    animation: modalSlide 0.2s ease-out;
}

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

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.modal-head h2 {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
}

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}

.close-btn:hover {
    color: #ffffff;
}

.modal-content {
    padding: 24px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
}

.modal-content p {
    margin-bottom: 14px;
}

.modal-content strong {
    color: #ffffff;
}

.modal-content a {
    color: #38bdf8;
}
