@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;800;900&family=Montserrat:wght@300;400;600;700&display=swap');

:root {
    --bg-primary: #05020a;
    --bg-secondary: #100a20;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --purple-glow: #b24bf3;
    --ocean-cyan: #00c2ff;
    --mystic-purple: #7b2ff7;
    --danger-red: #ff4d4d;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --gradient-treasure: linear-gradient(135deg, #b24bf3, #7b2ff7);
    --gradient-ocean: linear-gradient(135deg, #7b2ff7, #4a00e0);
}

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

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

/* Noise & Grain */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(images/%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.text-purple {
    background: var(--gradient-treasure);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(178, 75, 243, 0.3);
}

.text-cyan {
    color: var(--ocean-cyan);
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 16px 40px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    background: var(--gradient-treasure);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 20px rgba(178, 75, 243, 0.4);
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 40px rgba(178, 75, 243, 0.7);
}

.btn-primary:hover::before {
    left: 100%;
}

/* Navigation */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 20px 5%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s ease;
    opacity: 0; /* GSAP reveals */
}

header.scrolled {
    background: rgba(5, 2, 10, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 5%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    fill: var(--purple-glow);
    filter: drop-shadow(0 0 10px rgba(178, 75, 243, 0.6));
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 900;
    letter-spacing: 2px;
}

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

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--purple-glow);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--purple-glow);
}

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

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

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at center, transparent 0%, #05020a 80%),
        url('images/dark-ocean-storm-bg.png') center/cover no-repeat;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    margin-top: -60px; /* Offset to center visually with legal box at bottom */
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--ocean-cyan);
    letter-spacing: 5px;
    margin-bottom: 20px;
    text-transform: uppercase;
    display: inline-block;
    font-weight: 600;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 30px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero-cta {
    margin-top: 15px;
    font-size: 1.25rem;
    padding: 18px 45px;
}

/* Legal Box in Hero */
.hero-legal-wrapper {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
    padding: 0 20px;
}

.hero-legal-box {
    margin: 0;
    max-width: 700px;
    padding: 15px 25px;
    border: 1px solid rgba(178, 75, 243, 0.4);
    box-shadow: 0 0 20px rgba(178, 75, 243, 0.2) inset, 0 0 15px rgba(178, 75, 243, 0.2);
    background: rgba(5, 2, 10, 0.6);
    backdrop-filter: blur(10px);
    text-align: center;
}

.hero-legal-box p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    line-height: 1.4;
}

.hero-legal-box p:last-child {
    margin-bottom: 0;
}

.hero-legal-box strong {
    color: var(--text-primary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
}

/* Section Common */
section {
    padding: 120px 5%;
    position: relative;
    z-index: 10;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
}

/* Pirate World / Story Split */
.split-section {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.split-content {
    flex: 1;
}

.split-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.split-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.split-image {
    flex: 1;
    position: relative;
}

.split-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    filter: brightness(0.8) contrast(1.2);
    border: 1px solid var(--glass-border);
}

.split-image::after {
    content: '';
    position: absolute;
    top: -20px; left: -20px; width: 100%; height: 100%;
    border: 2px solid var(--purple-glow);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

/* Game Showcase */
.game-section {
    background: radial-gradient(circle at center, var(--bg-secondary) 0%, var(--bg-primary) 70%);
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    border-radius: 20px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(178, 75, 243, 0.2), rgba(123, 47, 247, 0.1));
    box-shadow: 0 0 80px rgba(178, 75, 243, 0.15);
    transition: transform 0.3s ease;
}

.game-container:hover {
    transform: scale(1.01);
    box-shadow: 0 0 100px rgba(178, 75, 243, 0.25);
}

.game-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--purple-glow);
    box-shadow: 0 0 30px rgba(178, 75, 243, 0.4) inset;
    background: #000;
}

.game-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: none;
}

.aura {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120%; height: 120%;
    background: radial-gradient(circle, rgba(178, 75, 243, 0.15) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: rotate(45deg) translateY(100%);
    transition: transform 0.6s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(178, 75, 243, 0.4);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 20px rgba(178, 75, 243, 0.1);
}

.feature-card:hover::before {
    transform: rotate(45deg) translateY(-100%);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(178, 75, 243, 0.5));
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--purple-glow);
}

.feature-card p {
    color: var(--text-secondary);
}

/* Parallax Ocean */
.parallax-ocean {
    height: 60vh;
    background: 
        linear-gradient(rgba(5,2,10,0.8), rgba(5,2,10,0.8)),
        url('images/parallax-ocean-horizon.png') center/cover fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.parallax-ocean h2 {
    font-size: 4rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.9);
}

/* Interactive Chest Mini Experience */
.interactive-section {
    text-align: center;
    padding: 100px 5%;
}

.chest-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 50px auto;
    cursor: pointer;
    perspective: 1000px;
}

.chest {
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%23b24bf3"><path d="M10,40 h80 v40 a10,10 0 0 1 -10,10 h-60 a10,10 0 0 1 -10,-10 z"/><path d="M10,40 c0,-20 20,-30 40,-30 c20,0 40,10 40,30 z" fill="%238a2be2"/><rect x="45" y="35" width="10" height="15" fill="%2305020a"/></svg>') center/contain no-repeat;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.8));
}

.chest-wrapper:hover .chest {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 20px 40px rgba(178, 75, 243, 0.4));
}

.chest-glow {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 50px 30px var(--purple-glow);
    opacity: 0;
    pointer-events: none;
}

.coin {
    position: absolute;
    width: 15px; height: 15px;
    background: var(--purple-glow);
    border-radius: 50%;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

/* Trust & Legal Cards */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.trust-card {
    padding: 25px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.trust-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

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

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 60px 5% 30px;
    text-align: center;
}

.footer-legal-notice {
    max-width: 1000px;
    margin: 0 auto 40px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0,0,0,0.3);
}

.footer-legal-notice p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-company-info {
    margin-bottom: 25px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links {
    margin-bottom: 30px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--purple-glow);
}

.copyright {
    color: #64748b;
    font-size: 0.85rem;
}

/* Standard Pages (About, Contact, etc.) */
.page-header {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(5,2,10,0.8), rgba(5,2,10,0.9)),
                url('images/dark-ocean-storm-bg.png') center/cover;
    border-bottom: 1px solid var(--glass-border);
}

.page-content {
    max-width: 1000px;
    margin: -50px auto 100px;
    padding: 60px;
    background: var(--bg-secondary);
}

.page-content h2 {
    color: var(--purple-glow);
    margin-bottom: 20px;
    margin-top: 40px;
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.page-content ul {
    margin-bottom: 20px;
    margin-left: 20px;
    color: var(--text-secondary);
}

.page-content li {
    margin-bottom: 10px;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--purple-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title { font-size: 4rem; }
    .split-section { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    nav ul { display: none; } /* Simplified for demo, would add hamburger in prod */
    .hero-title { font-size: 2.5rem; margin-bottom: 25px; }
    .hero-content { margin-top: -80px; }
    .hero-legal-wrapper { bottom: 20px; padding: 0 15px; }
    .hero-legal-box { padding: 12px; }
    .hero-legal-box p { font-size: 0.75rem; }
    .hero-legal-box strong { font-size: 0.85rem; }
    section { padding: 80px 5%; }
    .section-title { font-size: 2.2rem; }
    .page-content { padding: 30px; margin: 0 auto 50px; border-radius: 0; }
}