/* Magicka.Games Theme - Modern Blocky & Metallic Gold */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #050505;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    
    --text-color: #f0f0f0;
    --text-muted: #888;
    
    /* Metallic Gold Palette */
    --gold-primary: #c5a059; /* More metallic, less yellow */
    --gold-highlight: #e6c885;
    --gold-shadow: #8a6e32;
    --gold-gradient: linear-gradient(135deg, var(--gold-shadow), var(--gold-primary), var(--gold-highlight), var(--gold-primary), var(--gold-shadow));
    --gold-text-gradient: linear-gradient(to bottom, #f3e5ab, #c5a059);
    
    --border-color: #333;
    --border-active: var(--gold-primary);
    
    --spacing-unit: 1.5rem;
    
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Rajdhani', sans-serif; /* Tech-focused but readable */
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h1 { font-size: 3.5rem; font-weight: 700; background: var(--gold-text-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: 2.5rem; border-bottom: 2px solid var(--gold-shadow); padding-bottom: 0.5rem; }
h3 { font-size: 1.8rem; }

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--gold-highlight);
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.4);
}

/* Layout Utilities */
.container {
    max-width: 1400px; /* Wider for modern screens */
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section:nth-child(even) {
    background-color: var(--bg-secondary);
}

/* Modern Blocky Components */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.btn:hover {
    color: #000;
    border-color: var(--gold-highlight);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
}

.btn:hover::before {
    width: 100%;
}

.card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-shadow);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card:hover::after {
    transform: scaleX(1);
}

/* Header */
header {
    background-color: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-color);
    border: 2px solid var(--gold-primary);
    padding: 0.5rem 1rem;
    position: relative;
}

.logo span {
    color: var(--gold-primary);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--gold-primary);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.menu-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--gold-primary);
    transition: all 0.3s ease;
}

/* Footer */
footer {
    background-color: #000;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: var(--gold-primary);
}

/* Game Hero */
.game-hero {
    height: 70vh;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(0,0,0,0.3), rgba(0,0,0,0.9)), url('../media/icons/mm_background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-bottom: 1px solid var(--gold-shadow);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.game-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--bg-color), transparent);
}

.game-logo-large {
    max-width: 350px;
    width: 60%;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.8));
    animation: float 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Grids */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.gem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.gem-card {
    background: linear-gradient(145deg, #111, #0d0d0d);
    border: 1px solid #222;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.gem-card:hover {
    border-color: var(--gold-shadow);
    transform: translateY(-5px);
    background: linear-gradient(145deg, #1a1a1a, #111);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.gem-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.gem-card:hover .gem-icon {
    transform: scale(1.1);
}

.gem-name {
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gem-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Locations */
.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 0; /* Tight grid for blocky look */
    border: 1px solid var(--border-color);
}

.location-card {
    position: relative;
    height: 250px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin: -1px; /* Overlap borders */
}

.location-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: brightness(0.7) grayscale(0.2);
}

.location-card:hover .location-bg {
    transform: scale(1.1);
    filter: brightness(1) grayscale(0);
}

.location-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    padding: 1.5rem;
    transform: translateY(30%);
    transition: transform 0.4s ease;
}

.location-card:hover .location-info {
    transform: translateY(0);
}

.location-name {
    color: var(--gold-highlight);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px #000;
    margin-bottom: 0.2rem;
    white-space: normal; /* Allow wrapping */
    line-height: 1.2;
}

.location-info span {
    font-size: 0.9rem;
    color: #ccc;
    display: block;
    margin-top: 0.2rem;
}

/* Specimens */
.specimen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.specimen-card {
    background: #080808;
    border: 1px solid var(--border-color);
    padding: 1rem;
    text-align: center;
}

.specimen-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 1px solid #222;
}

/* Tools */
.tools-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4rem;
    text-align: center;
}

.tool-item {
    transition: transform 0.3s ease;
}

.tool-item:hover {
    transform: scale(1.1);
}

.tool-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.2));
}

/* Gallery & Lightbox */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 9/16; /* Assuming most are portrait/mobile based on filename */
}

.screenshot-img:hover {
    border-color: var(--gold-primary);
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    object-fit: contain;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--text-color);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--gold-primary);
    text-decoration: none;
}

/* Game Chiclet Grid - Homepage */
.games-chiclet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.game-chiclet {
    display: block;
    width: 280px;
    height: 280px;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
}

.game-chiclet:hover {
    border-color: var(--gold-primary);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(197, 160, 89, 0.2);
}

.chiclet-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.chiclet-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3);
    transition: all 0.5s ease;
}

.game-chiclet:hover .chiclet-bg img {
    filter: brightness(0.5);
    transform: scale(1.1);
}

.chiclet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.chiclet-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2;
}

.chiclet-logo {
    width: 70%;
    max-width: 180px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.8));
    transition: transform 0.4s ease;
}

.game-chiclet:hover .chiclet-logo {
    transform: scale(1.05);
}

.chiclet-title {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.game-chiclet:hover .chiclet-title {
    opacity: 1;
    transform: translateY(0);
}

/* Game Header Section */
.game-header-section {
    padding: 4rem 0 3rem;
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-color));
    border-bottom: 1px solid var(--border-color);
}

.game-header-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.game-header-logo {
    width: 200px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.6));
}

.game-header-info {
    flex: 1;
}

.game-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: var(--gold-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border: none;
    padding: 0;
}

.game-tagline {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* App Store Buttons */
.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    font-family: var(--font-body);
    text-decoration: none;
    transition: all 0.3s ease;
}

.store-btn:hover {
    background: #111;
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
    transform: translateY(-2px);
}

.store-btn svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.store-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.store-btn-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.store-btn-store {
    font-size: 1.1rem;
    font-weight: 600;
}

.store-btn-ios:hover {
    border-color: #0071e3;
    box-shadow: 0 0 20px rgba(0, 113, 227, 0.3);
}

.store-btn-android:hover {
    border-color: #3ddc84;
    box-shadow: 0 0 20px rgba(61, 220, 132, 0.3);
}

.store-btn-primary {
    background: var(--gold-gradient);
    border-color: var(--gold-primary);
    color: #000;
}

.store-btn-primary:hover {
    color: #000;
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    border-color: var(--gold-shadow);
    color: var(--gold-primary);
}

.btn-secondary::before {
    display: none;
}

/* Device Prompt Modal */
.device-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.device-prompt-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.device-prompt-logo {
    width: 120px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
}

.device-prompt-content h3 {
    margin-bottom: 0.5rem;
}

.device-prompt-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.device-prompt .store-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 1rem;
}

.device-prompt-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.device-prompt-dismiss:hover {
    color: var(--gold-primary);
}

/* Video Hero Section */
.video-hero-section {
    padding: 3rem 0;
    background: linear-gradient(to bottom, var(--bg-color), var(--bg-secondary));
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

/* Responsive for Game Header */
@media (max-width: 768px) {
    .game-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .game-header-logo {
        width: 150px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .store-buttons {
        justify-content: center;
    }
    
    .game-chiclet {
        width: 240px;
        height: 240px;
    }
    
    .video-hero-section {
        padding: 2rem 1rem;
    }
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
    background-color: #222;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-btn { display: flex; }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(5, 5, 5, 0.98);
        border-bottom: 1px solid var(--gold-primary);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transform: translateY(-200%);
        opacity: 0;
        transition: all 0.4s ease;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .hero h1 { font-size: 2.5rem; }
    
    .location-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-content {
        width: 95%;
    }
    
    /* Homepage Hero Mobile Fix */
    .game-hero {
        height: auto;
        min-height: 60vh;
        padding: 4rem 1rem;
        background-attachment: scroll;
    }
    
    .game-hero h1 {
        font-size: 2rem;
        word-break: break-word;
    }
    
    .game-hero p {
        font-size: 1.1rem !important;
        padding: 0 0.5rem;
    }
    
    .game-hero .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}
