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

:root {
    --primary-green: #00ff88;
    --secondary-green: #00ff00;
    --accent-cyan: #00d4ff;
    --muted-gray: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #777777;
    --card-bg: rgba(17, 17, 17, 0.8);
    --border-color: rgba(0, 255, 0, 0.3);
}

html, body {
    margin: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--muted-gray);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Matrix background container - keep layout safe */
.matrix-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.matrix-character {
    position: absolute;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

/* Scanline overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    z-index: 0;
    opacity: 0.5;
}

/* Matrix background overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 255, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 200, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 0, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 150, 255, 0.02) 0%, transparent 50%);
    z-index: 0;
    opacity: 0.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header styles */
header {
    text-align: center;
    padding: 60px 20px 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

header::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
}

#matrix-title {
    font-family: 'Roboto', sans-serif;
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: 6px;
    margin-bottom: 20px;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(0, 255, 0, 0.5); }
    50% { text-shadow: 0 0 30px rgba(0, 255, 0, 0.8), 0 0 60px rgba(0, 200, 255, 0.5); }
}

.header-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 10px;
    font-weight: 300;
}

/* Terminal styles */
.terminal-container {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    margin-bottom: 50px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
}

.terminal-header {
    background: rgba(17, 17, 17, 0.6);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.terminal-body {
    padding: 24px;
    min-height: 220px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-primary);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 0, 0.3) var(--card-bg);
}

.terminal-body::-webkit-scrollbar {
    width: 6px;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.3);
    border-radius: 3px;
}

.terminal-line {
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.prompt {
    color: var(--primary-green);
    margin-right: 8px;
    font-weight: 700;
}

.response {
    color: var(--accent-cyan);
}

.terminal-input {
    width: 100%;
    background: rgba(17, 17, 17, 0.5);
    border: none;
    padding: 16px 24px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    outline: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease;
}

.terminal-input:focus {
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

/* Buttons container */
.buttons-container {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.button {
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.button::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 ease;
}

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

.button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 255, 0, �.3),
        0 0 30px rgba(0, 200, 255, 0.2);
}

.button:active {
    transform: translateY(1px);
}

.button:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 4px;
}

.discord {
    background: linear-gradient(135deg, #5865F2, #4f5bd6);
    color: white;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.discord:hover {
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.5);
    transform: translateY(-2px);
}

.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.youtube:hover {
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.5);
    transform: translateY(-2px);
}

.tutoriais {
    background: linear-gradient(135deg, #ffa500, #ff6b6b);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}

.tutoriais:hover {
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.5);
    transform: translateY(-2px);
}

/* Tutorial section */
#tutoriais-section {
    padding: 60px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 50px;
    position: relative;
    z-index: 1;
}

#tutoriais-section h2 {
    color: var(--primary-green);
    margin-bottom: 40px;
    font-size: 2.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 15px;
}

#tutoriais-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-green);
}

.video-container {
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 255, 0, 0.1);
}

.video-container iframe {
    width: 100%;
    height: 450px;
    border: none;
    transition: transform 0.3s ease;
}

.video-container iframe:hover {
    transform: scale(1.02);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

/* Entrance animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-up-delay-1 { animation-delay: 0.1s; }
.fade-in-up-delay-2 { animation-delay: 0.2s; }
.fade-in-up-delay-3 { animation-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    #matrix-title {
        font-size: 4rem;
    }
    
    .buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .button {
        width: 90%;
        justify-content: center;
    }
    
    .terminal-body {
        padding: 20px;
    }
    
    .video-container iframe {
        height: 350px;
    }
    
    header {
        padding: 40px 15px 30px;
    }
    
    #tutoriais-section {
        padding: 40px 15px;
    }
}

@media (max-width: 480px) {
    #matrix-title {
        font-size: 3rem;
    }
    
    .terminal-body {
        padding: 15px;
        font-size: 0.85rem;
    }
    
    .video-container iframe {
        height: 280px;
    }
    
    header {
        padding: 30px 15px 20px;
    }
    
    #tutoriais-section h2 {
        font-size: 2rem;
    }
}