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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGradient 5s ease infinite;
}

@keyframes titleGradient {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(45deg); }
}

.page-subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 50px;
    font-size: 1.2rem;
}

.backgrounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.background-showcase {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.background-showcase:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

.background-info {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.5);
}

.background-info h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.background-demo {
    height: 400px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-content {
    text-align: center;
    z-index: 1;
    padding: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-content h4 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.demo-content p {
    color: rgba(255, 255, 255, 0.8);
}

.code-section {
    position: relative;
    margin-top: 20px;
}

.code-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.code-tab {
    padding: 8px 20px;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.code-tab.active {
    background: rgba(102, 126, 234, 0.5);
    border-bottom: none;
}

.code-block {
    background: #1a1a2e;
    border-radius: 0 10px 10px 10px;
    padding: 20px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.code-block.active {
    display: block;
}

.copy-btn {
    position: absolute;
    top: 50px;
    right: 10px;
    background: #667eea;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-btn:hover {
    background: #764ba2;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #00ff88;
}

/* Background 1: Animated Gradient Mesh */
.bg-gradient-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    overflow: hidden;
}

.bg-gradient-mesh::before,
.bg-gradient-mesh::after,
.gradient-orb {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float-orb 20s ease-in-out infinite;
}

.bg-gradient-mesh::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #667eea 0%, transparent 70%);
    top: -300px;
    left: -300px;
    animation-duration: 25s;
}

.bg-gradient-mesh::after {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, #764ba2 0%, transparent 70%);
    bottom: -400px;
    right: -400px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.gradient-orb {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #f093fb 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 35s;
    animation-delay: -10s;
}

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

/* Background 2: Animated Stars Field */
.bg-stars-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0a 100%);
    overflow: hidden;
}

.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

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

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
    animation: shoot 3s linear infinite;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), white);
    transform: translateX(-100px);
}

@keyframes shoot {
    0% {
        transform: translate(0, 0) rotate(-45deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(600px, 600px) rotate(-45deg);
        opacity: 0;
    }
}

.nebula {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    filter: blur(40px);
    animation: drift 40s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(100px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-50px, 100px) rotate(240deg);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive */
@media (max-width: 768px) {
    .backgrounds-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 2.5rem;
    }
}