/* ============================================
   TALENTBUILDS - Base CSS
   Shared styles and CSS variables for all pages
   ============================================ */

/* CSS Variables - Override these in game-specific CSS */
:root {
    /* Colors - Dark grey with vibrant purple accents */
    --color-accent: #a855f7;
    --color-accent-hover: #c084fc;
    --color-accent-glow: rgba(168, 85, 247, 0.5);
    --color-accent-subtle: rgba(168, 85, 247, 0.08);
    --color-accent-border: rgba(168, 85, 247, 0.4);
    
    --color-bg-body: #0c0c0e;
    --color-bg-container: #161618;
    --color-bg-section: #111113;
    --color-bg-hover: #1e1e22;
    
    --color-border: #2a2a2e;
    --color-border-light: #3a3a40;
    
    --color-text: #e4e4e7;
    --color-text-muted: #a1a1aa;
    --color-text-dim: #71717a;
    --color-text-faint: #65656b;
    
    /* Typography */
    --font-main: 'Exo 2', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --container-padding: 20px;
    --content-padding: 30px;
    --section-padding: 25px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

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

/* Body - Flexbox for sticky footer */
body {
    font-family: var(--font-main);
    background: var(--color-bg-body);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    min-height: 100vh;
    padding: 70px 0px 0px;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0px 3px 12px #000;
}

/* ============================================
   Header
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--color-bg-container) 0%, var(--color-bg-section) 100%);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-accent);
    padding: 30px;
    text-align: center;
}


.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-weight: 700;
}

.header h1 a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

.header p {
    color: var(--color-text-muted);
    font-size: 1.1em;
    letter-spacing: 1px;
}

/* ============================================
   Navigation - Fixed Top Bar
   ============================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 30px;
    background: var(--color-bg-section);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    animation: nav-glow 10s ease-in-out infinite;
}

@keyframes nav-glow {
    0%, 100% { box-shadow: 0 0px 4px var(--color-accent-subtle); }
    50% { box-shadow: 0 0px 8px var(--color-accent-glow); }
}

.site-nav .nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    max-width: calc(100vw - 250px); /* Leave room for brand */
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.site-nav .nav-right::-webkit-scrollbar {
    height: 4px;
}

.site-nav .nav-right::-webkit-scrollbar-track {
    background: transparent;
}

.site-nav .nav-right::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.site-nav .nav-right a {
    white-space: nowrap;
    flex-shrink: 0;
}

.site-nav a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
}

.site-nav a:hover {
    color: var(--color-accent-hover);
    background: var(--color-accent-subtle);
}

.site-nav a.active {
    color: var(--color-accent);
    font-weight: 600;
}

/* Discord button styling */
.nav-discord-btn {
    background: #5865F2 !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-discord-btn:hover {
    background: #4752C4 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.nav-discord-btn svg {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    flex-shrink: 0;
}

/* Move home link to end on desktop */
.site-nav .nav-right a:first-child {
    order: 99;
}

/* Hamburger button - hidden on desktop */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hamburger animation when open */
.site-nav.menu-open .nav-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.site-nav.menu-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
}

.site-nav.menu-open .nav-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.site-nav .nav-brand {
    font-weight: 600;
    letter-spacing: 1px;
    color: #a855f7 !important;
}

.site-nav .nav-brand:hover {
    color: #c084fc !important;
}

/* Breadcrumb style nav (legacy, inside container) */
.nav {
    padding: 15px 30px;
    background: var(--color-bg-section);
    border-bottom: 1px solid var(--color-border);
}

.nav a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--color-accent-hover);
    text-shadow: 0 0 8px var(--color-accent-glow);
}

/* ============================================
   Footer - Sticky at bottom
   ============================================ */
.site-footer {
    flex-shrink: 0;
    background: var(--color-bg-section);
    border-top: 1px solid var(--color-border);
    padding: 30px;
    text-align: center;
    color: var(--color-text-dim);
    font-size: 0.85em;
    margin-top: 40px;
    width: 100%;
}

.site-footer a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.site-footer .footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    min-height: 40px;
}

/* Ko-Fi placeholder on left side */
.footer-kofi-placeholder {
    min-width: 200px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

/* Vertically center Ko-Fi widget */
.site-footer iframe[id*="kofi"],
.site-footer div[id*="kofi"],
.site-footer [id^="kofi"],
.site-footer [class*="kofi"] {
    vertical-align: middle !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Target Ko-Fi widget specifically and center it in placeholder */
.footer-kofi-placeholder iframe,
.footer-kofi-placeholder div[id*="kofi"],
.footer-kofi-placeholder [id^="kofi"] {
    margin: auto 0 !important;
    vertical-align: middle !important;
}

/* Also target Ko-Fi widgets that might be injected into footer */
.site-footer > iframe[id*="kofi"],
.site-footer > div[id*="kofi"] {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.site-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
}

.site-footer .footer-copyright {
    color: var(--color-text-faint);
}

/* Discord dropdown button */
.footer-discord-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.footer-discord-btn {
    background: #5865F2;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.footer-discord-btn:hover {
    background: #4752C4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.footer-discord-btn svg {
    flex-shrink: 0;
}

.footer-discord-dropdown.open .footer-discord-btn svg:last-child {
    transform: rotate(180deg);
}

.footer-discord-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
}

.footer-discord-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--color-border);
}

.footer-discord-menu a:last-child {
    border-bottom: none;
}

.footer-discord-menu a:hover {
    background: var(--color-bg-hover);
    color: var(--color-accent);
}

/* ============================================
   Content Area
   ============================================ */
.content {
    padding: var(--content-padding);
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    font-size: 2em;
    color: var(--color-accent);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.section-title::before {
    content: "■";
    color: var(--color-accent);
    font-size: 0.6em;
}

/* ============================================
   Cards (Game Cards, Tool Cards)
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    min-height: 185px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: left;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-bg-image, var(--color-bg-section));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
    z-index: 0;
}

.card:hover {
    border-color: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 0 25px var(--color-accent-glow);
}

.card:hover::before {
    transform: scale(1.1);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.70) 40%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.card .swipe {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-accent-subtle), transparent);
    transition: left 0.5s;
    z-index: 2;
    pointer-events: none;
}

.card:hover .swipe {
    left: 100%;
}

.card > * {
    position: relative;
    z-index: 2;
}

.card h3 {
    font-size: 1.8em;
    color: var(--color-accent);
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 1px 1px 4px #000;
}

.card p {
    color: var(--color-text);
    font-size: 0.9em;
    margin-top: 10px;
    text-shadow: 2px 2px 1px #000;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    padding: 12px 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--color-bg-container);
    color: var(--color-accent);
    font-family: var(--font-main);
}

.btn:hover {
    background: var(--color-accent);
    color: var(--color-bg-body);
    border-color: var(--color-accent);
    box-shadow: 0 0 20px var(--color-accent-glow);
    transform: translateY(-2px);
}

.btn-primary {
    border-color: var(--color-accent);
}

.btn-secondary {
    border-color: var(--color-border-light);
    color: var(--color-text-muted);
}

.btn-secondary:hover {
    background: var(--color-border-light);
    color: #fff;
    border-color: var(--color-border-light);
    box-shadow: 0 0 15px rgba(74, 74, 90, 0.4);
}

.btn-danger {
    border-color: #8b0000;
    color: #ff4444;
}

.btn-danger:hover {
    background: #8b0000;
    color: #fff;
    border-color: #8b0000;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.4);
}

/* ============================================
   Sections
   ============================================ */
.section {
    background: var(--color-bg-section);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--section-padding);
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

/* ============================================
   Activity Items (Checklist)
   ============================================ */
.activity-item {
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0;
    margin-bottom: 10px;
    display: flex;
    align-items: stretch;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.3s;
}

.activity-item:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-accent);
    transform: translateX(3px);
    box-shadow: 0 0 15px var(--color-accent-subtle);
}

.activity-item:hover::before {
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent-glow);
}

.activity-item.completed {
    background: var(--color-accent-subtle);
    border-color: var(--color-accent-border);
}

.activity-item.completed::before {
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent-glow);
}

.activity-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 14px 12px 14px 16px;
    cursor: pointer;
    accent-color: var(--color-accent);
}

.activity-item label {
    flex: 1;
    cursor: pointer;
    font-size: 0.95em;
    user-select: none;
    color: var(--color-text);
    padding: 14px 16px 14px 0;
    display: flex;
    align-items: center;
}

.activity-item.completed label {
    color: var(--color-text-muted);
}

.activity-info {
    font-size: 0.75em;
    color: var(--color-text-faint);
    margin-left: 8px;
    font-style: italic;
}

/* ============================================
   Controls
   ============================================ */
.controls {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 968px) {
    .sections-container {
        flex-direction: column;
    }

    .section {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Mobile hamburger menu */
    .nav-hamburger {
        display: block;
    }
    
    .site-nav .nav-right {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        background: var(--color-bg-section);
        flex-direction: column;
        padding: 0;
        gap: 0;
        max-height: 0;
        max-width: 100%;
        overflow: hidden;
        overflow-x: visible;
        transition: max-height 0.3s ease, border 0.3s ease;
        border-bottom: none;
    }
    
    .site-nav.menu-open .nav-right {
        max-height: 300px;
        padding: 10px 0;
        border-bottom: 1px solid var(--color-border);
    }
    
    .site-nav .nav-right a {
        display: block;
        width: 100%;
        padding: 15px 30px;
        border-radius: 0;
        text-align: center;
        order: 0; /* Reset order on mobile */
    }
    
    .site-nav .nav-right a:hover {
        background: var(--color-bg-hover);
    }

    .header h1 {
        font-size: 1.8em;
    }

    .content {
        padding: 30px 20px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* Activity items - smaller padding and stacked layout on mobile */
    .activity-item input[type="checkbox"] {
        margin: 10px 10px 10px 12px;
    }
    
    .activity-item label {
        padding: 10px 12px 10px 0;
        flex-wrap: wrap;
    }
    
    .activity-info {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    .site-nav .nav-left,
    .site-nav .nav-right {
        justify-content: center;
    }
}

/* ============================================
   Floating Discord Button
   ============================================ */
.floating-discord-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
}

.floating-discord-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #5865F2;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9em;
    transition: transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.floating-discord-button:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 2px 2px 8px #000;
    color: white;
}

.floating-discord-button:active {
    transform: translateY(0);
}

.floating-discord-button svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.floating-discord-text {
    white-space: nowrap;
}

.floating-discord-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: var(--color-bg-section);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    overflow: hidden;
    z-index: 999;
}

.floating-discord-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.9em;
    transition: background 0.2s;
    border-bottom: 1px solid var(--color-border);
}

.floating-discord-menu a:last-child {
    border-bottom: none;
}

.floating-discord-menu a:hover {
    background: var(--color-bg-hover);
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .floating-discord-container {
        right: 15px;
    }
    
    .floating-discord-button {
        padding: 0;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        justify-content: center;
    }
    
    .floating-discord-text {
        display: none; /* Hide text on mobile, show only icon */
    }
    
    .floating-discord-menu {
        right: 0;
        min-width: 160px;
    }
}

