.nav-link.active {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    border-radius: 0.375rem; /* 6px */
}

/* Custom CSS for thematic elements and animations not directly covered by Tailwind */
body {
    font-family: 'Inter', sans-serif;
    /* Deep, dark background for a futuristic/heroic lair feel */
    background-color: #0d1226; /* A very dark blue/purple */
    color: #e2e8f0; /* Light off-white for text contrast */
    overflow-x: hidden; /* Prevent horizontal scroll bars, especially with animations */
}

body main, body section {
    color: rgb(55 65 81 / var(--tw-text-opacity, 1));
}

.background-hero {
    background-image: url('../img/bg/landscape_1.png');
    background-size: cover; /* Cover the entire element */
    background-position: center; /* Center the image */
    position: fixed; /* Position relative to the window */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Use 100% of the viewport height */
    z-index: -1; /* Send to background */
    /* Apply a filter to make it darker and slightly desaturated for mood */
    filter: brightness(0.4) grayscale(0.5);
    /* Subtle panning animation for dynamism */
    animation: subtlePan 60s linear infinite alternate;
}

/* Keyframe animation for the background pan effect */
@keyframes subtlePan {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Glowing text effect for main titles */
.glowing-text {
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.6), 0 0 15px rgba(59, 130, 246, 0.4), 0 0 25px rgba(59, 130, 246, 0.2);
}

.hi-white {
    color: #e2e8f0 !important;
}

/* --- Full Page Loader --- */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 18, 38, 0.95); /* Same as body bg but with alpha */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.loader-spinner {
    border: 8px solid rgba(243, 243, 243, 0.2); /* Light grey */
    border-top: 8px solid #3b82f6; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
}

#page-loader p {
    color: #e2e8f0;
    margin-top: 20px;
    font-size: 1.2rem;
    font-family: 'Russo One', sans-serif;
    letter-spacing: 0.05em;
    text-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Custom Star Selector --- */
.star-selector-container {
    background-color: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
}

.star-selector-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.star-selector-tier-btn {
    border: 1px solid var(--border-primary);
    background-color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: var(--text-secondary);
}

.star-selector-tier-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.star-selector-tier-btn.active {
    color: white;
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--border-accent);
}

.star-selector-tier-btn[data-tier="Unlocked"] { background-color: #e2e8f0; color: #475569; }
.star-selector-tier-btn[data-tier="White"] { background-color: #f1f5f9; color: #475569; }
.star-selector-tier-btn[data-tier="Blue"].active { background-color: #3b82f6; border-color: #3b82f6; }
.star-selector-tier-btn[data-tier="Purple"].active { background-color: #8b5cf6; border-color: #8b5cf6; }
.star-selector-tier-btn[data-tier="Gold"].active { background-color: #f59e0b; border-color: #f59e0b; }
.star-selector-tier-btn[data-tier="Red"].active { background-color: #ef4444; border-color: #ef4444; }


.star-selector-stars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.75rem;
    color: #cbd5e1;
}

.star-selector-star {
    cursor: pointer;
    transition: transform 0.1s ease-in-out;
}

.star-selector-star:hover {
    transform: scale(1.15);
}

.star-selector-stars.tier-white .star-selector-star.active {
    color: #a8a29e;
}
.star-selector-stars.tier-blue .star-selector-star.active {
    color: #3b82f6;
}
.star-selector-stars.tier-purple .star-selector-star.active {
    color: #8b5cf6;
}
.star-selector-stars.tier-gold .star-selector-star.active {
    color: #f59e0b;
}
.star-selector-stars.tier-red .star-selector-star.active {
    color: #ef4444;
}
.star-selector-stars.tier-unlocked .star-selector-star.active {
    color: #cbd5e1;
}

/* --- App CTA Buttons --- */
.app-cta-container {
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    margin-top: 3rem;
}

.cta-buttons-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem; /* 12px */
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    color: #fff;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(30, 41, 59, 0.6); /* slate-800 with opacity */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1), 0 4px 6px -2px rgba(59, 130, 246, 0.08);
    background-color: rgba(51, 65, 85, 0.7); /* slate-700 with opacity */
}

.cta-icon {
    width: 2.25rem; /* 36px */
    height: 2.25rem; /* 36px */
}

.cta-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.cta-subtitle {
    font-size: 0.8rem; /* 12px */
    font-weight: 400;
    opacity: 0.8;
    line-height: 1;
}

.cta-title {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
    line-height: 1.2;
}

.cta-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(50%);
}

.cta-button.disabled:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    background-color: rgba(30, 41, 59, 0.6);
}