/* Base Styles */
:root {
    --primary: #FF6B6B; /* Vibrant Pink */
    --secondary: #4ECDC4; /* Vibrant Green */
    --accent: #FF8A00; /* Vibrant Orange */
    --dark: #292F36; /* Almost Black */
    --light: #FFFFFF; /* White */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}

/* Parallax Layers */
.parallax-wrapper {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 10px;
}

.header {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    z-index: -1;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(-10px) scale(2);
    background: linear-gradient(to bottom, #292F36, #111);
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(-10px) scale(2);
}

.stars::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 4px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 3px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 4px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    animation: twinkle 10s ease infinite alternate;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.5; }
}

.middle-layer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(255, 107, 107, 0.2) 30%, 
        rgba(255, 138, 0, 0.3) 60%, 
        rgba(78, 205, 196, 0.4) 100%);
    transform: translateZ(-5px) scale(1.5);
}

.grid-layer {
    position: absolute;
    bottom: 0;
    width: 110%;
    height: 30%;
    transform: translateZ(-3px) scale(1.3);
    background-image: 
        linear-gradient(rgba(255, 138, 0, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 138, 0, 0.3) 1px, transparent 1px);
    background-size: 60px 60px;
    perspective: 1000px;
    transform-style: preserve-3d;
    transform-origin: bottom;
    animation: grid-animation 15s linear infinite;
}

@keyframes grid-animation {
    0% { background-position: 0 0; }
    100% { background-position: 60px 0; }
}

.foreground {
    position: absolute;
    height: 100%;
    width: 100%;
    object-fit: cover;
    transform: translateZ(-1px) scale(1.1);
}

/* Digital rain effect (Matrix-style) */
.digital-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(-2px) scale(1.2);
    opacity: 0.2;
    overflow: hidden;
}

.digital-rain::before {
    content: "";
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: calc(100% + 100px);
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--secondary) 25%, 
        var(--accent) 50%, 
        var(--secondary) 75%, 
        var(--primary) 100%);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    opacity: 0.1;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="0" y="10" font-family="monospace" font-size="10">01</text><text x="0" y="20" font-family="monospace" font-size="10">10</text><text x="0" y="30" font-family="monospace" font-size="10">01</text><text x="0" y="40" font-family="monospace" font-size="10">10</text><text x="0" y="50" font-family="monospace" font-size="10">01</text><text x="0" y="60" font-family="monospace" font-size="10">10</text><text x="0" y="70" font-family="monospace" font-size="10">01</text><text x="0" y="80" font-family="monospace" font-size="10">10</text><text x="0" y="90" font-family="monospace" font-size="10">01</text><text x="0" y="100" font-family="monospace" font-size="10">10</text></svg>');
    mask-size: 50px 50px;
    mask-repeat: repeat;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Elements */
.floating-element {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: float 8s infinite ease-in-out;
    z-index: -1;
}

.float1 {
    top: 20%;
    left: 10%;
    background-color: rgba(255, 107, 107, 0.3);
    animation-delay: 0s;
}

.float2 {
    top: 60%;
    right: 20%;
    background-color: rgba(78, 205, 196, 0.3);
    animation-delay: 2s;
}

.float3 {
    top: 30%;
    right: 10%;
    background-color: rgba(255, 138, 0, 0.3);
    animation-delay: 4s;
}

.float4 {
    top: 70%;
    left: 20%;
    background-color: rgba(255, 107, 107, 0.3);
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* Content Styling */
.content {
    position: relative;
    background-color: var(--dark);
}

/* Nav Bar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background-color: rgba(41, 47, 54, 0.95);
    z-index: 1000;
    backdrop-filter: blur(5px);
    border-bottom: 2px solid var(--accent);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
}

/* Navigation Links */
.nav-links a {
    margin-left: 25px;
    color: var(--light);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    position: relative;
    cursor: pointer;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--accent);
    outline: none;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    background-color: rgba(41, 47, 54, 0.7);
    padding: 40px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--light);
    text-shadow: 0 0 10px rgba(255, 138, 0, 0.5);
    position: relative;
    display: inline-block;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent), var(--secondary));
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    line-height: 1.6;
    color: var(--light);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 138, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    outline: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover,
.btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(255, 138, 0, 0.4);
    outline: none;
}

.btn:hover::before,
.btn:focus::before,
.btn:active::before {
    width: 100%;
}

/* Active state for buttons */
.btn-active {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(255, 107, 107, 0.4);
}

/* Active state for navigation */
.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    width: 100%;
}

/* Sections */
section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    color: var(--light);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent), var(--secondary));
}

.category {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 50px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.category h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.category h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30%;
    height: 2px;
    background: var(--accent);
}

.resources {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.resource-card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.resource-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.resource-card:hover::before {
    transform: scaleX(1);
}

.resource-card h4 {
    color: var(--light);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.resource-card p {
    color: #ccc;
    font-size: 0.9rem;
    flex-grow: 1;
}

.resource-card a {
    color: var(--secondary);
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
    font-weight: bold;
    transition: color 0.3s ease;
}

.resource-card a:hover {
    color: var(--accent);
}

/* Footer */
footer {
    background-color: var(--dark);
    padding: 50px 20px;
    text-align: center;
    border-top: 2px solid var(--accent);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--dark));
}

footer p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #ddd;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.social-links a {
    margin: 0 15px;
    color: var(--light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .category h3 {
        font-size: 1.5rem;
    }

    .resources {
        grid-template-columns: 1fr;
    }
}