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

:root {
    /* Fantasy Color Palette */
    --forest-green: #1a472a;
    --royal-blue: #1e3a8a;
    --crimson-red: #991b1b;
    --gold: #fbbf24;
    --silver: #e5e7eb;
    --stone-grey: #6b7280;
    --dark-grey: #374151;
    --light-grey: #f3f4f6;
    --black: #111827;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--royal-blue), var(--forest-green));
    --gradient-gold: linear-gradient(135deg, #fbbf24, #f59e0b);
    --gradient-crimson: linear-gradient(135deg, #dc2626, #991b1b);
    
    /* Typography */
    --font-primary: 'Cinzel', serif;
    --font-decorative: 'Cinzel Decorative', serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 20px;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gold);
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crest {
    position: relative;
    width: 50px;
    height: 50px;
}

.crest.small {
    width: 40px;
    height: 40px;
}

.shield {
    width: 100%;
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gold);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    animation: gentle-glow 3s ease-in-out infinite alternate;
}

.emblem {
    font-size: 24px;
    color: var(--black);
}

.crest.small .emblem {
    font-size: 20px;
}

@keyframes gentle-glow {
    0% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.5); }
    100% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.8); }
}

.brand-name {
    font-family: var(--font-decorative);
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--silver);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover {
    color: var(--black);
    border-color: var(--gold);
    text-shadow: none;
}

.nav-link:hover::before {
    left: 0;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--gold);
    transition: all 0.3s ease;
}

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

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.9), 
        rgba(26, 71, 42, 0.9), 
        rgba(153, 27, 27, 0.8)
    ), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="castle" patternUnits="userSpaceOnUse" width="100" height="100"><rect width="100" height="100" fill="%23111827"/><path d="M20,80 L80,80 L80,20 L70,20 L70,30 L60,30 L60,20 L50,20 L50,30 L40,30 L40,20 L30,20 L30,30 L20,30 Z" fill="%23374151" opacity="0.3"/></pattern></defs><rect width="1000" height="1000" fill="url(%23castle)"/></svg>');
    background-size: cover;
    background-position: center;
    animation: subtle-movement 20s ease-in-out infinite alternate;
}

@keyframes subtle-movement {
    0% { transform: scale(1) translateX(0); }
    100% { transform: scale(1.05) translateX(-20px); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    font-family: var(--font-decorative);
    margin-bottom: 30px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}

.title-main {
    display: block;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
    animation: title-entrance 2s ease-out;
}

.title-sub {
    display: block;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 400;
    color: var(--silver);
    animation: title-entrance 2s ease-out 0.5s both;
}

@keyframes title-entrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-description {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--silver);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: fade-in-up 2s ease-out 1s both;
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    position: relative;
    background: var(--gradient-gold);
    color: var(--black);
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-primary);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.3);
    animation: fade-in-up 2s ease-out 1.5s both;
}

.cta-button::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: left 0.6s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(251, 191, 36, 0.5);
}

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

.button-text {
    position: relative;
    z-index: 2;
}

/* Sections */
section {
    padding: var(--section-padding);
}

.section-title {
    font-family: var(--font-decorative);
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

/* Features Section */
.features {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(26, 71, 42, 0.1));
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="runes" patternUnits="userSpaceOnUse" width="50" height="50"><rect width="50" height="50" fill="transparent"/><text x="25" y="25" font-family="serif" font-size="20" fill="%23374151" opacity="0.1" text-anchor="middle">⚡</text></pattern></defs><rect width="100" height="100" fill="url(%23runes)"/></svg>');
    opacity: 0.3;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 2;
}

.feature-card {
    background: rgba(17, 24, 39, 0.8);
    border: 2px solid var(--stone-grey);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    border-color: var(--gold);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.2);
}

.feature-card:hover::before {
    opacity: 0.1;
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: grayscale(0);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px var(--gold));
}

.feature-card h3 {
    font-family: var(--font-decorative);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.feature-card p {
    color: var(--silver);
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

/* About Section */
.about {
    background: var(--gradient-primary);
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.ancient-scroll {
    background: linear-gradient(145deg, #8b5a2b, #6d4c41);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.ancient-scroll:hover {
    transform: rotate(0deg) scale(1.02);
}

.scroll-content {
    background: #f4f1e8;
    border-radius: 15px;
    padding: 40px;
    position: relative;
    min-height: 300px;
}

.rune-border {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 3px solid #8b5a2b;
    border-radius: 10px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(139, 90, 43, 0.1) 10px,
        rgba(139, 90, 43, 0.1) 20px
    );
}

.map-illustration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(139, 90, 43, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.map-illustration::before {
    content: '🗺️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.6;
}

.about-text {
    color: var(--white);
}

.lore-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--silver);
}

.lore-text p:first-child::first-letter {
    float: left;
    font-family: var(--font-decorative);
    font-size: 4rem;
    line-height: 1;
    margin: 0 8px 0 0;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Games Section */
.games {
    background: rgba(17, 24, 39, 0.95);
    position: relative;
}

.games-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: var(--silver);
    margin-bottom: 60px;
    font-style: italic;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.game-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--dark-grey);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(251, 191, 36, 0.3);
}

.game-frame {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image {
    transform: scale(1.1);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-title {
    font-family: var(--font-decorative);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.play-button {
    background: var(--gradient-gold);
    color: var(--black);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.3);
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.5);
}

/* Contact Section */
.contact {
    background: var(--gradient-primary);
    position: relative;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.mystical-form {
    background: rgba(17, 24, 39, 0.8);
    border: 2px solid var(--stone-grey);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(55, 65, 81, 0.8);
    border: 2px solid var(--stone-grey);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.submit-button {
    background: var(--gradient-gold);
    color: var(--black);
    border: none;
    padding: 15px 35px;
    border-radius: 25px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.5);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card {
    background: rgba(17, 24, 39, 0.8);
    border: 2px solid var(--stone-grey);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2);
}

.info-card h3 {
    color: var(--gold);
    font-family: var(--font-decorative);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.info-card p {
    color: var(--silver);
    line-height: 1.6;
}

.disclaimer {
    font-size: 0.95rem;
    font-style: italic;
    border-left: 3px solid var(--gold);
    padding-left: 15px;
}

/* Footer */
.footer {
    background: var(--black);
    border-top: 3px solid var(--gold);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-motto {
    color: var(--silver);
    font-style: italic;
    margin-top: 10px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-link {
    color: var(--silver);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: var(--gold);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--stone-grey);
    text-align: center;
}

.copyright {
    color: var(--stone-grey);
    font-size: 0.9rem;
    line-height: 1.6;
}

.copyright strong {
    color: var(--gold);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title .title-main {
        font-size: 40px !important;
    }

    
    
    .hero-title .title-sub {
        font-size: 2rem;
    }

    
}

@media (max-width: 480px) {
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 15px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .game-frame {
        height: 200px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.3), transparent);
    animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}