:root {
    --primary: #FFD700;
    /* Molten Gold */
    --accent: #B8860B;
    /* Dark Goldenrod */
    --bg-dark: #1A1A1B;
    /* Dark Marble base */
    --stone: #2A2A2B;
    /* Stone texture */
    --text-main: #FFFFFF;
    --text: #F5F5F5;

    --font-cinzel: 'Cinzel', serif;
    --font-mont: 'Montserrat', sans-serif;

    --gold-glow: 0 0 20px rgba(255, 215, 0, 0.3);
    --engraved: inset 2px 2px 5px rgba(0, 0, 0, 0.8), 1px 1px 0 rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-mont);
    overflow-x: hidden;
    /* Marble Texture - Fallback to dark if missing */
    background-image: url('public/images/marble_texture.png'), linear-gradient(to bottom, #1A1A1B, #000);
    background-attachment: fixed;
    background-blend-mode: overlay;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
.logo {
    font-family: var(--font-cinzel);
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 2px;
    text-shadow: var(--gold-glow);
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    /* Changed from height: 100vh to allow growth */
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(31, 31, 31, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
    position: relative;
    border-bottom: 2px solid var(--primary);
    padding: 8rem 2rem 4rem 2rem;
    /* Added top padding for Nav clearance */
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* No background specified, assuming transparent or inherited */
    z-index: 1;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--bg-dark), transparent);
    pointer-events: none;
}

.hero-content {
    z-index: 10;
    max-width: 900px;
    padding: 2rem;
    animation: fadeIn 2s ease-out;
}

/* --- SYSTEM BOOT ANIMATIONS --- */
.boot-headline {
    animation: bootHeadline 0.8s ease-out forwards;
    animation-delay: 0.6s;
}

.boot-sub {
    animation: bootFadeIn 1s ease-out forwards;
    animation-delay: 1.4s;
}

.boot-cta {
    animation: bootFadeIn 1s ease-out forwards;
    animation-delay: 1.6s;
}

/* Subtle CTA Pulse after boot */
.boot-cta a {
    animation: subtleGlow 3s infinite alternate;
    animation-delay: 2.5s;
}

/* Keyframes */
@keyframes bootHeadline {
    0% {
        opacity: 0;
        filter: blur(12px);
        letter-spacing: 6px;
        transform: translateY(6px);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        letter-spacing: 0;
        /* Default spacing */
        transform: translateY(0);
    }
}

@keyframes bootFadeIn {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtleGlow {
    0% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
    }

    100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
}

/* Micro-interaction on Hover */
#hero-entry-btn:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 0 15px var(--primary);
    border-color: #fff;
}

/* Pre-flight Arrow Animation */
.arrow-pulse {
    animation: arrowPulse 2s infinite ease-in-out;
}

@keyframes arrowPulse {
    0% {
        opacity: 0.4;
        transform: translateY(0);
    }

    50% {
        opacity: 0.8;
        transform: translateY(-4px);
    }

    100% {
        opacity: 0.4;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #ccc;
    margin-bottom: 3rem;
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    display: inline-block;
}

/* --- CTA BUTTON (Golden Ripple) --- */
.cta-button {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    font-family: var(--font-cinzel);
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    color: #000;
    background: linear-gradient(45deg, #FFD700, #FDB931, #FFD700);
    background-size: 200% auto;
    border: 1px solid #fff;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    transition: all 0.4s ease;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    animation: shimmer 3s infinite linear;
    text-transform: uppercase;
    cursor: pointer;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    background-position: right center;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- NAV & FOOTER --- */
nav {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    /* color and text-shadow handled by h1, h2, h3, .logo rule */
}

.btn-cta-small {
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 2px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-cta-small:hover {
    background: var(--primary);
    color: #000;
}

.links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: 0.3s;
}

.links a:hover {
    color: var(--primary);
}

/* --- CARDS (The Armory) --- */
.content-section {
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centira elemente horizontalno */
    justify-content: center;
    text-align: center;
    /* Centira tekstualni sadržaj */
    /* background set by body mostly, but sections can have transparency */
    background: rgba(0, 0, 0, 0.3);
}

.content-section h2 {
    margin-left: auto;
    margin-right: auto;
}

/* Fix for Proving Ground Card list */
#proving-ground .card ul {
    display: inline-block;
    text-align: left;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1100px;
    /* Ograničava širinu grida da se ne razvuče previše */
    margin: 0 auto;
}

/* --- TICKER ANIMATION --- */
@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-content span {
    padding-right: 4rem;
}

.card {
    background: rgba(42, 42, 43, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.1);
    padding: 0;
    /* Keeping image flush */
    width: 320px;

    /* Reveal Animation Base State */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;

    position: relative;
    overflow: hidden;
    text-align: center;
}

.card:hover {
    border: 1px solid var(--primary);
    box-shadow: var(--gold-glow);
    transform: translateY(-5px) !important;
    /* Override reveal transform */
}

/* --- GENERAL RANK DOMINANCE (Prompt 3) --- */
.card:nth-child(3) {
    border-color: rgba(255, 215, 0, 0.4);
    transform: scale(1.05) translateY(30px);
    /* Initial scale up + reveal offset */
}

.card:nth-child(3):hover {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    /* Brighter glow */
    transform: scale(1.05) translateY(-5px) !important;
}

.card-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-bottom: 1px solid var(--accent);
}

.rank-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(80%) sepia(20%);
    /* Antique look */
}

.card:hover .rank-img {
    transform: scale(1.1);
    filter: grayscale(0%) sepia(0%);
}

.card h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.card p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    font-size: 0.9rem;
    color: #ccc;
}

.tier-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(180deg, #FFD700, #B8860B);
    color: #000;
    font-weight: bold;
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 2px;
    font-family: var(--font-cinzel);
    border: 1px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* --- DUAL CORE (Prompt 3) --- */
#card-hardware {
    background: linear-gradient(145deg, #1e1e1f, #252526);
    box-shadow: 0 0 60px rgba(255, 220, 150, 0.1);
    /* Sunlight glow */
    border-right: 4px solid var(--primary);
}

#card-software {
    background: #080808 !important;
    /* Cold/Minimalist */
    border-color: #333;
    border-left: 4px solid var(--primary);
}

/* --- APP SHOWCASE --- */
.floating {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.feature-list li span {
    font-size: 1.2rem;
    /* Ensuring icons align nicely */
    vertical-align: middle;
}

footer {
    padding: 3rem;
    background: #000;
    border-top: 2px solid var(--accent);
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.content-section h2 {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4rem;
    /* Increased from default/implicit to 4rem for better spacing */
}

.pulsing-text {
    animation: pulse 2s infinite;
}

.pulsing-text.silver {
    color: #C0C0C0;
    /* Silver */
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.4);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
    }
}

/* --- SECRET ARCHIVE (The General's Aura) --- */
#secret-menu {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease;
    opacity: 0;
    transform: scale(0.8);
}

#secret-menu.revealed {
    opacity: 1;
    transform: scale(1);
    animation: flashBreak 0.5s ease-out;
}

@keyframes flashBreak {
    0% {
        box-shadow: 0 0 100px rgba(255, 255, 255, 0.8);
        background: #fff;
    }

    100% {
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
        background: linear-gradient(to right, #000, #1A1A1B);
    }
}

.aura-text {
    position: relative;
    background: linear-gradient(to bottom, #FFD700, #FFF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseAura 4s infinite ease-in-out;
}

.aura-text::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
    opacity: 0.5;
    filter: blur(20px);
    z-index: -1;
    animation: pulseAuraShadow 4s infinite ease-in-out;
}

@keyframes pulseAura {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
}

/* The General's Aura Button */
.secret-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 60px;
    background: #000;
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    font-family: var(--font-cinzel);
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s ease;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.secret-btn span {
    z-index: 2;
    position: relative;
    letter-spacing: 2px;
}

.secret-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, #FFD700);
    animation: rotateAura 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.secret-btn::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #1A1A1B;
    z-index: 1;
}

.secret-btn:hover {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    border-color: #FFD700;
    transform: scale(1.05);
}

.secret-btn:hover::before {
    opacity: 1;
}

@keyframes rotateAura {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
