:root {
    --primary: #8a1c1c; /* Deep Rich Crimson */
    --secondary: #1a4220; /* Deep Emerald/Betel */
    --accent: #d4af37; /* Metallic Gold */
    --bg-dark: #fbf5eb;
    --text-light: #2c1a0e; 
    --font-heading: 'Abhaya Libre', serif;
    --font-body: 'Poppins', sans-serif;
    --parchment: #fcf4e3;
}

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

body {
    font-family: var(--font-body);
    background: radial-gradient(circle at 10% 20%, rgba(255, 246, 224, 1) 0%, rgba(246, 225, 178, 1) 100%);
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-light);
    overflow-x: hidden;
}

/* Navbar */


.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--primary);
}

.highlight {
    color: var(--accent);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.partnership {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
}

.partnership a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.partnership a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
    background: transparent;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('public/hero-banner.jpg') center top/cover no-repeat;
    opacity: 1;
    z-index: -1;
}

.hero-content {
    z-index: 10;
    max-width: 800px;
    animation: fadeIn 1.5s ease-out;
    margin-top: 250px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--secondary);
    font-weight: 500;
}

/* Glass Effect Utility for Premium Look */
.glass-effect {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Premium Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(45deg, var(--primary), #b32a2a);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px; /* Modern pill shape */
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 20px rgba(138, 28, 28, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%; right: -50%; bottom: -50%; left: -50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg) translate(-50%, -50%);
    transition: all 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 25px rgba(138, 28, 28, 0.4);
}

.btn-primary:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
}

/* Premium Games Section */
.games-section {
    padding: 5rem 3rem 7rem;
    text-align: center;
    position: relative;
    z-index: 10;
    width: 95%;
    max-width: 1300px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.games-section h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 3.5rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Premium Card Redesign */
.game-card {
    background: white;
    padding: 0;
    border: 1px solid rgba(212, 175, 55, 0.3); /* Target gold */
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 45px rgba(138, 28, 28, 0.2);
    border-color: var(--accent);
}

.card-image {
    flex-grow: 1;
    background: radial-gradient(circle at center, #ffffff 0%, #f7f0e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    position: relative;
    border-bottom: none;
    transition: transform 0.4s ease;
}

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

.card-title {
    background: white;
    color: var(--primary);
    text-align: center;
    padding: 1.2rem 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 2;
}

.coming-soon {
    opacity: 0.8;
}

/* Footer & Interconnections */
.footer {
    padding: 4rem 2rem 2rem;
    background-color: var(--primary);
    border-top: 8px solid var(--accent); /* Thick gold borderline */
    /* Add intricate pattern overlay for traditional feel */
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.04) 10px, transparent 10px, transparent 20px);
    background-size: 28.28px 28.28px;
    animation: moveStripes 1.5s linear infinite;
    text-align: center;
    color: #fdf2d8;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: -28.28px 0; }
}

.footer h3 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.sanahas-credit {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    display: inline-block;
}

.sanahas-credit p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: #dac7a6;
}

.sanahas-logo {
    font-size: 2.5rem;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    display: inline-block;
    transition: transform 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.sanahas-logo span {
    color: var(--accent);
}

.copyright {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #bfa881;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 5px; /* Square traditional */
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
    border: 3px solid var(--accent);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close {
    color: var(--primary);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content h2 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--secondary);
    font-weight: 600;
}

/* Game: Elephant */
.elephant-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 5px;
    overflow: hidden;
    cursor: crosshair;
    background: rgba(222, 184, 135, 0.3);
    padding: 10px;
    border: 2px dashed var(--primary);
}

.elephant-container img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    /* Light theme means we don't need invert anymore! The dark elephant looks great */
}

.target-eye {
    position: absolute;
    width: 15px;
    height: 15px;
    background: transparent;
    top: 40%;
    left: 30%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.placed-eye {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--primary);
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 5;
}

/* Game: Pots */
.pots-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap; 
}

.pot {
    font-size: 5rem;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    user-select: none;
    position: relative;
}

.pot:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 10px var(--accent));
}

.pot.broken {
    transform: scale(0.9) rotate(-10deg);
    filter: grayscale(0.8);
    pointer-events: none;
}

.pot.broken::after {
    content: '💥';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
}

.pot.winner.broken::after {
    content: '🍬';
    font-size: 4rem;
}

.flower-1 { top: 20%; left: 15%; animation-delay: 0s; }
.flower-2 { top: 70%; left: 10%; animation-delay: 2s; font-size: 4rem; }
.flower-3 { top: 30%; right: 15%; animation-delay: 1s; }
.flower-4 { bottom: 20%; right: 20%; animation-delay: 3s; font-size: 5rem;}
.flower-5 { top: 50%; left: 50%; animation-delay: 4s; font-size: 3.5rem; opacity: 0.15; }

.result-message {
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 2rem;
    color: var(--primary);
}

/* Game: Keta (Dice) */
.keta-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.dice {
    width: 80px;
    height: 80px;
    background: #FFFAF0; /* Ivory dice color */
    border: 3px solid var(--secondary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    box-shadow: inset -5px -5px 15px rgba(0,0,0,0.1), 3px 3px 10px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

.dice.rolling {
    animation: roll 0.5s infinite linear;
}

@keyframes roll {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Modern Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #3e0c0c 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.86, 0, 0.07, 1), visibility 0.8s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glow-effect {
    animation: masterGlow 2.5s ease-in-out infinite alternate;
}

@keyframes masterGlow {
    0% { transform: translateY(0px); opacity: 0.85; filter: drop-shadow(0 0 10px rgba(212,175,55,0.2)); }
    100% { transform: translateY(-10px); opacity: 1; filter: drop-shadow(0 15px 30px rgba(212,175,55,0.6)); }
}

/* Preloader Progress Bar */
.premium-loader-bar {
    width: 250px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-top: 30px;
    overflow: hidden;
    position: relative;
}

.premium-loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #fff);
    border-radius: 10px;
    animation: loadBar 3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes loadBar {
    0% { width: 0%; }
    50% { width: 60%; }
    100% { width: 100%; }
}

.loader-content h2 {
    color: var(--primary);
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

@media(max-width: 768px) {
    .hero { min-height: 40vh; padding: 4rem 1rem 2rem; }
    .hero-content { margin-top: 80px; }
    .hero h1 { font-size: 3rem; }
    .games-section { width: 100%; border: none; border-radius: 0; box-shadow: none; padding: 2rem 1rem; }
    .games-section h2 { font-size: 2.5rem; margin-bottom: 2rem; }
    .games-grid { gap: 1.5rem; }
    .footer { padding: 3rem 1rem 1.5rem; }
    .sanahas-logo { font-size: 2rem; }
}

@media(max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .btn-primary { padding: 0.8rem 2rem; font-size: 1rem; }
    .games-grid { grid-template-columns: 1fr; }
}
