/* Custom Properties for Theming */
:root {
    --color-bg-dark: #0f172a;
    --color-bg-light: #1e293b;
    --color-primary: #ec4899; /* Vibrant Pink */
    --color-secondary: #0ea5e9; /* Neon Blue */
    --color-accent: #facc15; /* Pineapple Yellow */
    --color-text: #f8fafc;
    --color-text-muted: #cbd5e1;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-speed: 0.3s;
    --rainbow-gradient: linear-gradient(90deg, #ff0018, #ffa52c, #ffff41, #008018, #0000f9, #86007d);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Define the animation */
@keyframes neonPulse {
    0% { box-shadow: 0 0 5px rgba(236, 72, 153, 0.4), 0 0 10px rgba(236, 72, 153, 0.4); }
    50% { box-shadow: 0 0 10px rgba(236, 72, 153, 0.8), 0 0 20px rgba(236, 72, 153, 0.6); }
    100% { box-shadow: 0 0 5px rgba(236, 72, 153, 0.4), 0 0 10px rgba(236, 72, 153, 0.4); }
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-align: center;
    transition: background-color var(--transition-speed), transform 0.2s;
    cursor: pointer;
    animation: neonPulse 2s infinite;
    border: 1px solid rgba(236, 72, 153, 0.5);
}

.btn-primary:hover {
    background-color: #be185d;
    transform: scale(1.05);
    animation: none; /* Stop pulsing on hover so the scale effect takes over */
    box-shadow: 0 0 20px rgba(236, 72, 153, 1);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px 0 rgba(236, 72, 153, 0.39);
}

/* Header & Navigation */
.site-header {
    background: rgba(15, 23, 42, 0.6); /* More transparent */
    backdrop-filter: blur(12px); /* The frosted glass effect */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-text);
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.5); /* Pineapple glow */
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand:hover .logo-text {
    transform: rotateY(360deg); /* 3D flip on hover */
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.main-nav a:not(.btn-primary):hover {
    color: var(--color-accent);
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    position: relative;
    border-radius: 3px;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    left: 0;
    border-radius: 3px;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: radial-gradient(circle at top left, rgba(46,16,101,0.85), rgba(15,23,42,0.85));
    position: relative;
    overflow: hidden;
}

.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
    animation: floatOrb 10s ease-in-out infinite alternate;
}

.hero::before {
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    top: -50px;
    left: -50px;
}

.hero::after {
    width: 400px;
    height: 400px;
    background: var(--color-secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    background: linear-gradient(270deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 5s ease infinite;
    filter: drop-shadow(0 0 15px rgba(236, 72, 153, 0.4));
}

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

.tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--color-secondary);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-image img:hover {
    transform: rotate(5deg) scale(1.05); /* Playful tilt and pop */
}

/* Rules Section */
.rules-section {
    padding: 5rem 0;
    background-color: rgba(30, 41, 59, 0.85);
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    color: var(--color-text-muted);
}

.rules-poster {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid transparent;
    border-radius: 20px;
    background-clip: padding-box;
    position: relative;
    padding: 3rem;
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.3), inset 0 0 20px rgba(14, 165, 233, 0.2);
}

.rules-poster::before {
    content: '';
    position: absolute;
    top: -3px; right: -3px; bottom: -3px; left: -3px;
    z-index: -1;
    border-radius: 23px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    animation: gradientBorder 6s ease infinite;
    background-size: 200% 200%;
}

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

.rules-title {
    font-size: 3.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 3rem;
    filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.4));
}

.rules-list {
    color: var(--color-text);
    font-size: 1.2rem;
    list-style: none;
    padding: 0;
    counter-reset: rules-counter;
}

.rules-list li {
    margin-bottom: 1.2rem;
    line-height: 1.6;
    padding: 1rem 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    border-left: 5px solid var(--color-secondary);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    counter-increment: rules-counter;
}

.rules-list li:hover {
    transform: translateX(10px);
    background: rgba(30, 41, 59, 0.8);
    border-left-color: var(--color-primary);
}

.rules-list li::before {
    content: counter(rules-counter);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--color-text-dark);
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    color: #0f172a;
}

/* Mobile Responsiveness for Rules */
@media (max-width: 768px) {
    .rules-poster {
        padding: 2rem 1.5rem;
    }

    .rules-title {
        font-size: 2rem;
    }

    .rules-list {
        font-size: 1rem;
        padding-left: 1rem;
    }
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)), url('assets/FCS_logo2.jpg') center/cover;
}

.cta-section h2 {
    font-size: 2.5rem;
    color: var(--color-accent);
}

.cta-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* Footer */
.site-footer {
    background-color: var(--color-bg-dark);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #334155;
    color: var(--color-text-muted);
}

.footer-note {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: var(--color-secondary);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-light);
        flex-direction: column;
        padding: 1rem 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .main-nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .rules-list {
        padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    }
}

/* Community Guidelines Section */
.guidelines-section {
    padding: 5rem 0;
    background-color: rgba(15, 23, 42, 0.85);
}

.guidelines-section h2 {
    font-size: 2.5rem;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.guideline-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--color-secondary);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.guideline-card::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.guideline-card > * {
    position: relative;
    z-index: 1;
}

.guideline-card:hover {
    transform: translateY(-5px);
}

.guideline-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.guideline-card:hover .card-icon {
    transform: scale(1.3) rotate(10deg);
}

.danger-card:hover .card-icon {
    animation: pulseRed 0.5s infinite alternate;
}

@keyframes pulseRed {
    from { transform: scale(1); filter: drop-shadow(0 0 0px red); }
    to { transform: scale(1.2); filter: drop-shadow(0 0 15px red); }
}

.guideline-card h3 {
    color: var(--color-text);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
}

.guideline-card p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* Typography utilities for cards */
.alert-text {
    color: #ef4444 !important; /* Bright red for warnings */
    font-weight: bold;
    text-transform: uppercase;
}

.highlight-text {
    color: var(--color-accent) !important; /* Pineapple yellow */
    font-weight: bold;
}

.note-text {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Special Danger Card (Spans across bottom if space allows) */
.danger-card {
    border-top-color: #ef4444;
    grid-column: 1 / -1; /* Spans full width of the grid */
    background: linear-gradient(to bottom right, var(--color-bg-light), #450a0a);
}

.danger-list {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.danger-list li {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #fca5a5;
}

/* Mobile Responsiveness for Guidelines */
@media (max-width: 768px) {
    .guidelines-section {
        padding: 4rem 0;
    }

    .guideline-card {
        padding: 1.5rem;
    }

    .guidelines-section h2 {
        font-size: 2rem;
    }
}

/* Classes for CSS Scroll Reveal */
.reveal {
    animation: reveal-animation linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
}

@keyframes reveal-animation {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #be185d;
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    z-index: 9999;
    box-shadow: 0 0 10px var(--color-primary);
    animation: scroll-progress-animation linear;
    animation-timeline: scroll(root block);
}

@keyframes scroll-progress-animation {
    from { width: 0%; }
    to { width: 100%; }
}

/* Pineapple Canvas Background */
#pineapple-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0; /* Sits above body color, behind the translucent sections */
    pointer-events: none;
}

header, main, footer {
    position: relative;
    z-index: 1; /* Keep content above the background canvas */
}
