/* ==========================================
   LEGAPALAS - Prismatic Effects Styles
   WebGL Background Integration
   ========================================== */

/* ==========================================
   WebGL Container Styles
   ========================================== */
.prismatic-container {
    position: relative;
    overflow: hidden;
}

.prismatic-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.prismatic-content {
    position: relative;
    z-index: 1;
}

/* ==========================================
   Enhanced Hero with Prismatic Background
   ========================================== */
.hero-prismatic {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 150px;
}

.hero-prismatic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 59, 122, 0.3) 0%,
        rgba(0, 59, 122, 0.6) 50%,
        rgba(0, 59, 122, 0.9) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero-prismatic .hero-content {
    position: relative;
    z-index: 2;
}

/* ==========================================
   Prismatic CTA Section
   ========================================== */
.cta-prismatic {
    position: relative;
    padding: 8rem 2rem;
    overflow: hidden;
}

.cta-prismatic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 27, 0.8) 0%,
        rgba(0, 59, 122, 0.7) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.cta-prismatic .cta-content {
    position: relative;
    z-index: 2;
}

/* ==========================================
   Prismatic Login Section
   ========================================== */
.login-prismatic {
    position: relative;
    padding: 8rem 2rem;
    overflow: hidden;
}

.login-prismatic::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        rgba(0, 59, 122, 0.5) 0%,
        rgba(44, 95, 141, 0.7) 50%,
        rgba(0, 59, 122, 0.9) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.login-prismatic .login-container {
    position: relative;
    z-index: 2;
}

/* ==========================================
   Feature Showcase with Prismatic
   ========================================== */
.feature-prismatic {
    position: relative;
    padding: 6rem 2rem;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.feature-prismatic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 59, 122, 0.85) 0%,
        rgba(44, 95, 141, 0.85) 100%
    );
    z-index: 1;
    border-radius: inherit;
}

.feature-prismatic .feature-content {
    position: relative;
    z-index: 2;
}

/* ==========================================
   Animated Text Overlays
   ========================================== */
.prismatic-title {
    font-size: 64px;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                 0 0 40px rgba(255, 255, 255, 0.1);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: prismaticGlow 3s ease-in-out infinite;
}

.prismatic-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

@keyframes prismaticGlow {
    0%, 100% {
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                     0 0 40px rgba(255, 255, 255, 0.1);
    }
    50% {
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                     0 0 60px rgba(255, 255, 255, 0.2),
                     0 0 80px rgba(220, 0, 50, 0.3);
    }
}

/* ==========================================
   Glass Cards on Prismatic Backgrounds
   ========================================== */
.glass-card-prismatic {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s ease;
}

.glass-card-prismatic:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    transform: translateY(-4px);
}

/* ==========================================
   Button Enhancements on Prismatic
   ========================================== */
.btn-prismatic {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 16px 40px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-prismatic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-prismatic:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-prismatic:hover::before {
    transform: translateX(100%);
}

.btn-prismatic-primary {
    background: linear-gradient(135deg, var(--primary-red), #ff1a4f);
    border: none;
    box-shadow: 0 4px 20px rgba(220, 0, 50, 0.4);
}

.btn-prismatic-primary:hover {
    box-shadow: 0 8px 32px rgba(220, 0, 50, 0.6);
    filter: brightness(1.1);
}

/* ==========================================
   Stats Grid on Prismatic
   ========================================== */
.stats-prismatic {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item-prismatic {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item-prismatic:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-item-prismatic h3 {
    font-size: 42px;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.stat-item-prismatic p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* ==========================================
   Loading State
   ========================================== */
.prismatic-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
}

.prismatic-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Responsive Adjustments
   ========================================== */
@media (max-width: 768px) {
    .prismatic-title {
        font-size: 42px;
    }

    .prismatic-subtitle {
        font-size: 18px;
    }

    .stats-prismatic {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .glass-card-prismatic {
        padding: 2rem;
    }

    .btn-prismatic {
        padding: 14px 32px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .prismatic-title {
        font-size: 32px;
    }

    .hero-prismatic,
    .cta-prismatic,
    .login-prismatic {
        padding: 4rem 1.5rem;
    }
}

/* ==========================================
   Performance Optimizations
   ========================================== */
.prismatic-container {
    will-change: transform;
    transform: translateZ(0);
}

.prismatic-bg canvas {
    will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .prismatic-title {
        animation: none;
    }

    .btn-prismatic::before {
        transition: none;
    }

    .glass-card-prismatic,
    .stat-item-prismatic {
        transition: opacity 0.2s ease;
    }
}
