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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.1) 0%, transparent 20%),
        radial-gradient(circle at 30% 50%, rgba(255,255,255,0.05) 0%, transparent 20%);
    pointer-events: none;
    z-index: -1;
}

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

header {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: -2;
}

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

header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ff9a9e, #fad0c4, #ff9a9e, #fad0c4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientText 3s ease infinite;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

header p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-bottom: 2.5rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-fill-mode: forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

section h2 {
    font-family: 'Poppins', sans-serif;
    color: #2c3e50;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    border-radius: 2px;
}

ul, ol {
    margin-left: 2.5rem;
}

ul li, ol li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 0.5rem;
}

ul li::before, ol li::before {
    content: '◆';
    position: absolute;
    left: -1rem;
    color: #6a11cb;
    font-size: 0.8rem;
}

ol li::before {
    content: counter(list-item) ".";
    counter-increment: list-item;
    color: #2575fc;
    font-weight: 500;
}

ol {
    counter-reset: list-item;
}

.code-list {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.code-item {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.08), rgba(37, 117, 252, 0.08));
    border: 1px solid rgba(106, 17, 203, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.code-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    border-color: rgba(106, 17, 203, 0.4);
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.12), rgba(37, 117, 252, 0.12));
}

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

.code-item:hover::before {
    left: 100%;
}

.code-item .code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    display: block;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    min-height: 1.8rem; /* Reserve space for animation */
}

.code-item .code span {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFadeIn 0.5s ease forwards;
}

@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.code-item .description {
    color: #555;
    font-size: 1rem;
    line-height: 1.4;
}

footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

footer #current-year {
    font-weight: 600;
    color: #ff9a9e;
}

/* Add some floating number elements for visual interest */
.floating-numbers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.number {
    position: absolute;
    color: rgba(255,255,255,0.1);
    font-family: 'Courier New', Courier, monospace;
    font-size: 2rem;
    pointer-events: none;
    user-select: none;
    transform: rotate(var(--rotate));
    animation: float var(--duration) ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(var(--rotate)); }
    50% { transform: translateY(-20px) rotate(var(--rotate)); }
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .code-item {
        padding: 1.25rem;
    }
    
    .code-item .code {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .code-list {
        gap: 1rem;
    }
    
    .code-item {
        padding: 1rem;
    }
}