:root[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #333333;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-primary: #00599c;
    --accent-secondary: #004482;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --hover-color: #004482;
    --particle-color: #004482;
    --number-bg: rgba(0, 89, 156, 0.2);
}

:root[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-primary: #00599c;
    --accent-secondary: #0077cc;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hover-color: #0077cc;
    --particle-color: #00599c;
    --number-bg: rgba(0, 89, 156, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Consolas', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Partículas */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Header */
header {
    background-color: var(--bg-secondary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.logo i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

/* Container Principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Introdução */
.intro {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out;
}

.intro h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature i {
    font-size: 2rem;
    color: var(--accent-primary);
    animation: float 3s ease-in-out infinite;
}

/* Grid de Fases */
.phase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.phase-card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.phase-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    background: var(--number-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.phase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.phase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}

.phase-card:hover::before {
    transform: scaleX(1);
}

.phase-icon {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.difficulty {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Animações */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

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

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

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: rotate(180deg);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    margin-top: 4rem;
}

footer i {
    color: #ff4444;
    animation: pulse 2s infinite;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .intro h1 {
        font-size: 2rem;
    }

    .features {
        flex-direction: column;
        gap: 2rem;
    }

    .phase-grid {
        grid-template-columns: 1fr;
    }
}