/* =====================================================
   SILICON HILAND - Premium Effects CSS
   Hiệu ứng đặc biệt cao cấp - Đẳng cấp Trí tuệ Vượt trội
   ===================================================== */

/* =====================================================
   1. NEURAL NETWORK CANVAS
   ===================================================== */
.neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto;
}

/* =====================================================
   2. MAGNETIC CURSOR
   ===================================================== */
.magnetic-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(201, 162, 39, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
    mix-blend-mode: difference;
}

.magnetic-cursor.grow {
    width: 60px;
    height: 60px;
    border-color: rgba(13, 148, 136, 0.8);
    background: rgba(201, 162, 39, 0.1);
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #c9a227, #0d9488);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.05s ease-out;
}

@media (max-width: 768px) {
    .magnetic-cursor,
    .cursor-dot {
        display: none;
    }
}

/* =====================================================
   3. GLOWING ORBS
   ===================================================== */
.orb-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.glowing-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: orbFloat var(--duration, 10s) ease-in-out var(--delay, 0s) infinite;
    left: var(--x-start, 50%);
    top: var(--y-start, 50%);
}

.glowing-orb:nth-child(1) {
    background: radial-gradient(circle, rgba(201, 162, 39, 0.6), transparent 70%);
}

.glowing-orb:nth-child(2) {
    background: radial-gradient(circle, rgba(13, 148, 136, 0.5), transparent 70%);
}

.glowing-orb:nth-child(3) {
    background: radial-gradient(circle, rgba(30, 58, 95, 0.6), transparent 70%);
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(100px, -50px) scale(1.1);
    }
    50% {
        transform: translate(50px, 100px) scale(0.9);
    }
    75% {
        transform: translate(-50px, 50px) scale(1.05);
    }
}

/* =====================================================
   4. TEXT REVEAL ANIMATION
   ===================================================== */
.text-reveal-wrapper {
    display: inline-block;
    overflow: hidden;
}

.text-reveal-content {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.revealed .text-reveal-content {
    transform: translateY(0);
}

/* Gradient text animation */
.gradient-text {
    background: linear-gradient(
        90deg,
        #c9a227 0%,
        #e6c547 25%,
        #0d9488 50%,
        #14b8a6 75%,
        #c9a227 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* =====================================================
   5. AURORA BACKGROUND
   ===================================================== */
.aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.aurora-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    opacity: 0.3;
}

.aurora-1 {
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg,
        rgba(201, 162, 39, 0.3) 60deg,
        transparent 120deg,
        rgba(13, 148, 136, 0.3) 180deg,
        transparent 240deg,
        rgba(30, 58, 95, 0.3) 300deg,
        transparent 360deg
    );
    animation: auroraRotate 20s linear infinite;
}

.aurora-2 {
    background: conic-gradient(
        from 120deg at 50% 50%,
        transparent 0deg,
        rgba(13, 148, 136, 0.2) 60deg,
        transparent 120deg,
        rgba(201, 162, 39, 0.2) 180deg,
        transparent 240deg,
        rgba(30, 58, 95, 0.2) 300deg,
        transparent 360deg
    );
    animation: auroraRotate 15s linear infinite reverse;
}

.aurora-3 {
    background: radial-gradient(
        ellipse at center,
        rgba(201, 162, 39, 0.1) 0%,
        transparent 50%
    );
    animation: auroraPulse 8s ease-in-out infinite;
}

@keyframes auroraRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes auroraPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

/* =====================================================
   6. SCROLL PROGRESS INDICATOR
   ===================================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e3a5f, #0d9488, #c9a227);
    z-index: 10000;
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(201, 162, 39, 0.5), 0 0 20px rgba(13, 148, 136, 0.3);
}

/* =====================================================
   7. FLOATING ELEMENTS
   ===================================================== */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 24px;
    opacity: 0.15;
    animation: floatUp var(--duration, 20s) linear var(--delay, 0s) infinite;
    left: var(--x, 50%);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* =====================================================
   8. MORPHING SHAPES
   ===================================================== */
.morphing-shape {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(13, 148, 136, 0.1));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 15s ease-in-out infinite;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* =====================================================
   9. INTELLECT METER
   ===================================================== */
.intellect-meter {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.meter-track {
    width: 6px;
    height: 150px;
    background: rgba(30, 58, 95, 0.3);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.meter-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #1e3a5f, #0d9488, #c9a227);
    border-radius: 3px;
    transition: height 0.3s ease-out;
}

.meter-glow {
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 26px;
    height: 100%;
    background: linear-gradient(to top, rgba(201, 162, 39, 0.3), transparent);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.meter-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.meter-icon {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .intellect-meter {
        display: none;
    }
}

/* =====================================================
   10. CLICK RIPPLE EFFECT
   ===================================================== */
.click-ripple {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(201, 162, 39, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    animation: rippleExpand 1s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* =====================================================
   11. DATA STREAMS CANVAS
   ===================================================== */
.data-streams-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

/* =====================================================
   12. GLASSMORPHISM CARDS
   ===================================================== */
.glass-card {
    background: rgba(30, 58, 95, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 162, 39, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* =====================================================
   13. NEON GLOW TEXT
   ===================================================== */
.neon-glow {
    text-shadow: 
        0 0 5px rgba(201, 162, 39, 0.5),
        0 0 10px rgba(201, 162, 39, 0.4),
        0 0 20px rgba(201, 162, 39, 0.3),
        0 0 40px rgba(201, 162, 39, 0.2);
}

.neon-glow-teal {
    text-shadow: 
        0 0 5px rgba(13, 148, 136, 0.5),
        0 0 10px rgba(13, 148, 136, 0.4),
        0 0 20px rgba(13, 148, 136, 0.3),
        0 0 40px rgba(13, 148, 136, 0.2);
}

/* =====================================================
   14. HOVER CARD EFFECTS
   ===================================================== */
.stat-card,
.ip-card,
.vision-card,
.block-card,
.impact-card,
.ip-item {
    position: relative;
    overflow: hidden;
}

.stat-card::before,
.ip-card::before,
.vision-card::before,
.block-card::before,
.impact-card::before,
.ip-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(201, 162, 39, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.stat-card:hover::before,
.ip-card:hover::before,
.vision-card:hover::before,
.block-card:hover::before,
.impact-card:hover::before,
.ip-item:hover::before {
    left: 100%;
}

/* Card border glow on hover */
.stat-card::after,
.ip-card::after,
.vision-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #c9a227, #0d9488, #1e3a5f, #c9a227);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderGlow 3s ease infinite;
}

.stat-card:hover::after,
.ip-card:hover::after,
.vision-card:hover::after {
    opacity: 1;
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* =====================================================
   15. SCROLL ANIMATION CLASSES
   ===================================================== */
.animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger effect */
.animate-in:nth-child(1) { transition-delay: 0s; }
.animate-in:nth-child(2) { transition-delay: 0.1s; }
.animate-in:nth-child(3) { transition-delay: 0.2s; }
.animate-in:nth-child(4) { transition-delay: 0.3s; }
.animate-in:nth-child(5) { transition-delay: 0.4s; }
.animate-in:nth-child(6) { transition-delay: 0.5s; }

/* =====================================================
   16. SECTION TRANSITIONS
   ===================================================== */
.section {
    opacity: 0.3;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   17. PULSE ANIMATIONS
   ===================================================== */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 15px rgba(201, 162, 39, 0);
    }
}

/* =====================================================
   18. SPOTLIGHT EFFECT
   ===================================================== */
.spotlight {
    position: relative;
    overflow: hidden;
}

.spotlight::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    transform: rotate(25deg);
    animation: spotlight 4s ease-in-out infinite;
}

@keyframes spotlight {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* =====================================================
   19. LOADING ANIMATION
   ===================================================== */
body:not(.loaded) {
    overflow: hidden;
}

body:not(.loaded)::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 99999;
    animation: fadeOut 0.5s ease 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* =====================================================
   20. ENHANCED BUTTON EFFECTS
   ===================================================== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    border-radius: 50%;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* =====================================================
   21. ICON SPIN ON HOVER
   ===================================================== */
.stat-icon i,
.card-icon i,
.bm-icon i {
    transition: transform 0.5s ease;
}

.stat-card:hover .stat-icon i,
.vision-card:hover .card-icon i,
.bigmen-card:hover .bm-icon i {
    transform: rotate(360deg);
}

/* =====================================================
   22. UNDERLINE ANIMATION
   ===================================================== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c9a227, #0d9488);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* =====================================================
   23. SPECIAL HIGHLIGHT BOX
   ===================================================== */
.highlight-box {
    position: relative;
    padding: 30px;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.2), rgba(13, 148, 136, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(201, 162, 39, 0.3);
}

.highlight-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #c9a227, #0d9488);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.highlight-box:hover::before {
    opacity: 1;
}

/* =====================================================
   24. RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 768px) {
    .glowing-orb {
        width: 200px;
        height: 200px;
    }
    
    .morphing-shape {
        width: 150px;
        height: 150px;
    }
    
    .floating-elements {
        display: none;
    }
}

/* =====================================================
   25. PERFORMANCE - Reduce motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .aurora-bg,
    .floating-elements,
    .data-streams-canvas,
    .glowing-orb,
    .morphing-shape {
        display: none;
    }
}
