:root {
    --bg-color: #0a0e1a;
    --text-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --yellow: #f59e0b;
    --green: #10b981;
    --cyan: #06b6d4;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary), transparent);
    top: -150px;
    left: -150px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary), transparent);
    bottom: -200px;
    right: -200px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent), transparent);
    top: 30%;
    left: 50%;
    animation-delay: -10s;
}

.blob-4 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--cyan), transparent);
    top: 60%;
    left: 10%;
    animation-delay: -15s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(50px, 80px) scale(1.2) rotate(10deg); }
}

/* Flying Shapes */
.flying-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(1px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fly 25s linear infinite;
}

.shape-1 { width: 60px; height: 60px; top: 5%; left: 5%; animation-duration: 28s; background: rgba(59, 130, 246, 0.05); }
.shape-2 { width: 90px; height: 90px; border-radius: 50%; top: 15%; right: 15%; animation-duration: 35s; animation-delay: -5s; background: rgba(236, 72, 153, 0.05); }
.shape-3 { width: 70px; height: 70px; transform: rotate(45deg); top: 75%; left: 10%; animation-duration: 25s; animation-delay: -10s; background: rgba(139, 92, 246, 0.05); }
.shape-4 { width: 50px; height: 50px; border-radius: 50%; bottom: 5%; right: 5%; animation-duration: 32s; animation-delay: -2s; background: rgba(16, 185, 129, 0.05); }
.shape-5 { width: 110px; height: 110px; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); top: 45%; left: 45%; animation-duration: 40s; animation-delay: -15s; background: rgba(6, 182, 212, 0.05); }
.shape-6 { width: 40px; height: 40px; top: 25%; left: 75%; animation-duration: 20s; background: rgba(245, 158, 11, 0.05); }
.shape-7 { width: 130px; height: 130px; border-radius: 50%; top: 65%; right: 55%; animation-duration: 45s; animation-delay: -8s; background: rgba(139, 92, 246, 0.03); }
.shape-8 { width: 25px; height: 25px; top: 10%; right: 35%; animation-duration: 18s; background: rgba(59, 130, 246, 0.05); }
.shape-9 { width: 80px; height: 80px; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); top: 55%; left: 80%; animation-duration: 30s; animation-delay: -20s; background: rgba(236, 72, 153, 0.04); }
.shape-10 { width: 95px; height: 95px; border-radius: 30%; top: 85%; left: 60%; animation-duration: 38s; animation-delay: -12s; background: rgba(16, 185, 129, 0.04); }

@keyframes fly {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.3; }
    25% { transform: translate(150px, 100px) rotate(90deg) scale(1.2); opacity: 0.5; }
    50% { transform: translate(80px, 200px) rotate(180deg) scale(0.9); opacity: 0.4; }
    75% { transform: translate(-80px, 100px) rotate(270deg) scale(1.1); opacity: 0.6; }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); opacity: 0.3; }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 1rem 3rem;
    position: relative;
}

.gradient-text {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent), var(--yellow));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    animation: gradient-shift 8s ease infinite;
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.subtitle {
    font-size: 1.3rem;
    color: #94a3b8;
    font-weight: 300;
    letter-spacing: 2px;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Generic Card Styles */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.card h2 {
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.card p {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 1. Glassmorphism */
.glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.btn-glow {
    margin-top: 1.5rem;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

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

.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
}

/* 2. 3D Flip */
.flip-container {
    perspective: 1500px;
    background: transparent;
    border: none;
    padding: 0;
}

.flipper {
    position: relative;
    width: 100%;
    min-height: 280px;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 20px;
}

.flip-container:hover .flipper {
    transform: rotateY(180deg);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    min-height: 280px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--card-border);
}

.front {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
}

.back {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    transform: rotateY(180deg);
}

/* 3. Neon Glow */
.neon {
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px var(--accent), inset 0 0 20px rgba(236, 72, 153, 0.2);
    animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 20px var(--accent), inset 0 0 20px rgba(236, 72, 153, 0.2); }
    50% { box-shadow: 0 0 40px var(--accent), 0 0 60px var(--accent), inset 0 0 30px rgba(236, 72, 153, 0.3); }
}

.neon h2 {
    text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid transparent;
    border-top: 5px solid var(--accent);
    border-right: 5px solid var(--accent);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin-top: 1.5rem;
    box-shadow: 0 0 20px var(--accent);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 4. Animated Border */
.border-anim {
    position: relative;
    background: var(--bg-color);
    z-index: 0;
    border: none;
}

.border-anim::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    background: conic-gradient(from 0deg, var(--primary), var(--yellow), var(--accent), var(--secondary), var(--cyan), var(--primary));
    z-index: -1;
    border-radius: 22px;
    animation: spin-border 5s linear infinite;
}

.border-anim .inner {
    background: var(--bg-color);
    width: 100%;
    height: 100%;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

@keyframes spin-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 5. Floating */
.floating-card {
    animation: card-float 4s ease-in-out infinite;
}

@keyframes card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.float-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float-icon 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(-5deg); }
    75% { transform: translateY(-20px) rotate(5deg); }
}

/* 6. Hover Reveal */
.reveal-card {
    position: relative;
}

.reveal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(139, 92, 246, 0.9));
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.reveal-overlay span {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    transform: scale(0.5) rotate(-10deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-card:hover .reveal-overlay {
    opacity: 1;
}

.reveal-card:hover .reveal-overlay span {
    transform: scale(1) rotate(0deg);
}

/* 7. Glitch Effect */
.glitch-card {
    background: rgba(0, 0, 0, 0.5);
}

.glitch {
    position: relative;
    font-size: 2rem;
    font-weight: 900;
}

.glitch-card:hover .glitch {
    animation: glitch 0.5s cubic-bezier(.25, .46, .45, .94) infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    color: var(--cyan);
    z-index: -1;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    color: var(--accent);
    z-index: -2;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 70% 0); transform: translate(-3px, 2px); }
    20% { clip-path: inset(60% 0 5% 0); transform: translate(3px, -2px); }
    40% { clip-path: inset(40% 0 45% 0); transform: translate(-2px, 3px); }
    60% { clip-path: inset(75% 0 10% 0); transform: translate(2px, -3px); }
    80% { clip-path: inset(10% 0 65% 0); transform: translate(-3px, 2px); }
    100% { clip-path: inset(30% 0 15% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 55% 0); transform: translate(3px, -2px); }
    20% { clip-path: inset(75% 0 10% 0); transform: translate(-3px, 3px); }
    40% { clip-path: inset(25% 0 15% 0); transform: translate(3px, 2px); }
    60% { clip-path: inset(5% 0 75% 0); transform: translate(-2px, -3px); }
    80% { clip-path: inset(45% 0 25% 0); transform: translate(2px, 3px); }
    100% { clip-path: inset(65% 0 5% 0); transform: translate(-3px, -2px); }
}

/* 8. Pulse Effect */
.pulse-circle {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: 0 0 20px var(--secondary);
}

.pulse-circle::before,
.pulse-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--secondary);
    animation: pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-circle::after {
    animation-delay: 1.25s;
}

@keyframes pulse-ring {
    0% { width: 100%; height: 100%; opacity: 1; }
    100% { width: 400%; height: 400%; opacity: 0; }
}

/* 9. Layered Text Shadow */
.layered-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--yellow);
    text-shadow: 
        2px 2px 0 var(--primary),
        4px 4px 0 var(--secondary),
        6px 6px 0 var(--accent),
        8px 8px 20px rgba(0, 0, 0, 0.5);
    animation: text-shimmer 3s ease-in-out infinite;
}

@keyframes text-shimmer {
    0%, 100% { text-shadow: 2px 2px 0 var(--primary), 4px 4px 0 var(--secondary), 6px 6px 0 var(--accent), 8px 8px 20px rgba(0, 0, 0, 0.5); }
    50% { text-shadow: -2px 2px 0 var(--accent), -4px 4px 0 var(--secondary), -6px 6px 0 var(--primary), -8px 8px 20px rgba(0, 0, 0, 0.5); }
}

/* 10. Morphing Shape */
.morph-shape {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--green), var(--cyan));
    margin-bottom: 1.5rem;
    animation: morph 5s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg); }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; transform: rotate(90deg); }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; transform: rotate(180deg); }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; transform: rotate(270deg); }
}

/* 11. Rainbow Wave */
.rainbow-card {
    background: rgba(0, 0, 0, 0.6);
}

.rainbow-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    margin-top: 1.5rem;
    background: linear-gradient(90deg, 
        red, orange, yellow, green, blue, indigo, violet, red);
    background-size: 200% 100%;
    animation: rainbow-slide 3s linear infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes rainbow-slide {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 12. Parallax */
.parallax-card {
    position: relative;
    overflow: visible;
}

.parallax-layer {
    font-size: 3rem;
    position: absolute;
    animation: parallax-float 5s ease-in-out infinite;
}

.layer-1 {
    top: -20px;
    left: 10%;
    animation-delay: 0s;
    filter: blur(1px);
}

.layer-2 {
    top: 10px;
    right: 15%;
    animation-delay: -1.5s;
}

.layer-3 {
    top: -10px;
    right: 5%;
    animation-delay: -3s;
    filter: blur(0.5px);
}

@keyframes parallax-float {
    0%, 100% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(-10px) translateX(-10px); }
}

/* 13. Neumorphism */
.neomorph-card {
    background: #1a1f35;
}

.neomorph-button {
    width: 80px;
    height: 80px;
    border-radius: 40px;
    background: #1a1f35;
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.neomorph-button:hover {
    box-shadow: 
        inset 6px 6px 12px rgba(0, 0, 0, 0.5),
        inset -6px -6px 12px rgba(255, 255, 255, 0.05);
}

/* 14. Gradient Border */
.gradient-border-card {
    position: relative;
    background: var(--bg-color);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.gradient-border-card::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--yellow), var(--green), var(--primary));
    background-size: 300% 300%;
    border-radius: 20px;
    z-index: -1;
    animation: gradient-shift 5s ease infinite;
}

/* 15. Typewriter */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    animation: typing 4s steps(30) infinite, blink 0.75s step-end infinite;
    max-width: fit-content;
    margin: 0 auto 1rem;
}

@keyframes typing {
    0%, 90%, 100% { width: 0; }
    30%, 60% { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* 16. Perspective Tilt */
.tilt-card {
    perspective: 1000px;
    background: transparent;
    border: none;
    padding: 0;
}

.tilt-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease;
    backdrop-filter: blur(10px);
}

.tilt-card:hover .tilt-content {
    transform: rotateX(10deg) rotateY(10deg) scale(1.05);
    box-shadow: 
        -20px 20px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(59, 130, 246, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    color: #64748b;
    margin-top: auto;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 3rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}