:root {
    --bg-color: #221D23;
    --accent-color: #D14081;
    --accent-hover: #b0306a;
    --text-color: #f0f0f0;
    --card-bg: #2d2630;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: rgba(34, 29, 35, 0.95);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: all 0.3s ease-in-out;
    transform: translateX(-50%);
    border-radius: 2px;
}

nav a:hover {
    color: var(--accent-color);
}

nav a:hover::after {
    width: 100%;
}

/* Sections */
section {
    padding: 80px 0;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

section:nth-child(even) {
    background: linear-gradient(135deg, #221D23 0%, #2a242b 100%);
}

section:nth-child(odd) {
    background: linear-gradient(135deg, #262027 0%, #1f1a20 100%);
}

/* Background Animation */
section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(209, 64, 129, 0.03) 0%, transparent 70%);
    animation: rotateBg 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

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

.container {
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Cards & Elements */
.card {
    background: linear-gradient(145deg, #2d2630, #252028);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 35px rgba(209, 64, 129, 0.15);
}

/* Grids for HTML & CSS Sections */
.card-grid, .comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tag-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.success-card {
    border-top: 4px solid #40D190;
}

.warning-card {
    border-top: 4px solid #D14040;
}

.success-card h3 { color: #40D190; }
.warning-card h3 { color: #D14040; }

.interactive-demo {
    text-align: center;
    margin-top: 30px;
}

.code-block {
    background-color: #1a161b;
    padding: 15px;
    border-radius: 10px;
    font-family: monospace;
    color: #a6e22e;
    margin: 15px 0;
    border-left: 4px solid var(--accent-color);
}

.btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    display: inline-block;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.step-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

/* Scroll Animation Classes */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

.step:nth-child(2) .step-icon {
    animation-delay: 0.5s;
}

.step:nth-child(3) .step-icon {
    animation-delay: 1s;
}

/* Icon List Styles */
.icon-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.icon-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.icon-list li::before {
    content: none;
}

/* Standard Cards Styles */
.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.standard-card {
    text-align: left;
    position: relative;
    overflow: hidden;
}

.standard-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: inline-block;
}

.standard-card ul {
    list-style: none;
    margin-top: 15px;
}

.standard-card li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.standard-card li::before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Visual Examples inside cards */
.visual-example {
    background-color: #1a161b;
    border-radius: 8px;
    margin-top: 15px;
    padding: 10px;
    height: 60px;
    display: flex;
    gap: 10px;
}

.grid-example div {
    flex: 1;
    background-color: rgba(209, 64, 129, 0.3);
    border: 1px dashed var(--accent-color);
    border-radius: 4px;
}

.flex-example {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.flex-example div {
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: flexPulse 2s infinite ease-in-out;
}

.flex-example div:nth-child(2) {
    width: 40px;
    height: 40px;
    background-color: #40D190;
    animation-delay: 0.3s;
}

.flex-example div:nth-child(3) {
    background-color: #4090D1;
    animation-delay: 0.6s;
}

@keyframes flexPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.spacing-list li {
    font-family: monospace;
    font-size: 1.1rem;
}

/* Workflow Steps */
.steps {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.step {
    flex: 1;
    min-width: 250px;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
}

.step-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

/* Mini Project Styles */
.project-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.project-step {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border-left: 5px solid var(--accent-color);
    position: relative;
    transition: transform 0.3s ease;
}

.project-step:hover {
    transform: translateX(10px);
}

.project-step h3 {
    margin-top: 0;
    color: var(--text-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    background-color: #1a161b;
    color: #888;
    margin-top: 40px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    header .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    nav a {
        font-size: 0.95rem;
    }

    .standards-grid, .card-grid, .comparison-grid {
        grid-template-columns: 1fr;
    }
}
