/* css/theme.css (Galactic Thrones Premium UI) */

:root {
    --bg-dark: #050b14;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-primary: #00e5ff; /* Cyan */
    --accent-secondary: #ffd700; /* Galactic Gold */
    --accent-error: #ff3366; /* Neon Red */
    --accent-success: #00ffaa; /* Neon Green */
    
    --glass-bg: rgba(5, 11, 20, 0.4);
    --glass-border: rgba(0, 229, 255, 0.2);
    --glass-border-hover: rgba(0, 229, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-speed: 0.3s;
}

body {
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6, .nav-logo {
    font-family: var(--font-heading) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Glassmorphism Containers */
.login-container, .form-container, .menu-box, .main-nav, .menu-admin-box, .main-admin-nav {
    background: var(--glass-bg) !important;
    box-shadow: var(--glass-shadow) !important;
    border-radius: 12px !important;
}

/* Specific Nav Overrides */
.main-nav, .main-admin-nav {
    background: #050b14 !important; /* Solid dark background to prevent content from bleeding underneath */
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

.menu-box {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    backdrop-filter: none;
}

/* Nav links styling */
.menu-box .nav-right a, .menu-admin-box .nav-right a, .dropbtn {
    font-family: var(--font-heading) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main) !important;
    transition: all var(--transition-speed) ease !important;
}

.menu-box .nav-right a:hover, .menu-admin-box .nav-right a:hover, .dropbtn:hover {
    color: var(--accent-primary) !important;
    background-color: rgba(0, 229, 255, 0.1) !important;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.nav-logo {
    color: var(--accent-secondary) !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Inputs */
input[type="text"], input[type="password"], input[type="current-password"], .box, .filter-form select {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: var(--text-main) !important;
    font-family: var(--font-body);
    transition: all var(--transition-speed) ease !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
}

input[type="text"]:focus, input[type="password"]:focus, .box:focus, .filter-form select:focus {
    outline: none;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3) !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Buttons */
.btn-primary, .btn-secondary, input[type="submit"] {
    font-family: var(--font-heading) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600 !important;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.8), rgba(0, 119, 255, 0.8)) !important;
    border: 1px solid rgba(0, 229, 255, 0.5) !important;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2) !important;
    color: #fff !important;
    border-radius: 6px !important;
    transition: all var(--transition-speed) ease !important;
    padding: 10px 20px !important;
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.7), rgba(255, 140, 0, 0.7)) !important;
    border: 1px solid rgba(255, 215, 0, 0.5) !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2) !important;
}

.btn-primary:hover, input[type="submit"]:hover {
    background: linear-gradient(135deg, rgba(0, 229, 255, 1), rgba(0, 119, 255, 1)) !important;
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5) !important;
    transform: translateY(-2px);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 1), rgba(255, 140, 0, 1)) !important;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5) !important;
    transform: translateY(-2px);
}

.btn-primary[disabled] {
    background: rgba(100, 100, 100, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.4) !important;
    transform: none !important;
}

/* Flash Messages / Toasts */
.flash_success, .flash_failure, .flash_message, .flash_warning {
    position: fixed !important; /* Locks to the browser window, preventing ALL layout shifts */
    top: 90px !important; /* Sits securely underneath the top navigation bar */
    margin: 0 !important; /* Prevent default margins from affecting absolute positioning */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    min-width: 300px;
    max-width: 90vw;
    z-index: 9999 !important;
    padding: 16px 24px !important;
    border-radius: 8px !important;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    text-align: center;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.flash_success, .flash_message {
    background: rgba(0, 50, 30, 0.95) !important;
    border: 1px solid var(--accent-success) !important;
    color: var(--accent-success) !important;
    text-shadow: 0 0 8px rgba(0, 255, 170, 0.3);
}

.flash_failure, .flash_warning {
    background: rgba(50, 10, 20, 0.95) !important; /* More opaque fallback */
    border: 1px solid var(--accent-error) !important;
    color: #ffb3c6 !important;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}
@keyframes slideDown {
    0% { transform: translate(-50%, -100%); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes fadeOut {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, -20px); opacity: 0; }
}

/* Dropdown Content */
.dropdown-content {
    background: rgba(15, 22, 35, 0.98) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}
.dropdown-content a {
    color: var(--text-main) !important;
    letter-spacing: normal;
}
.dropdown-content a:hover {
    background: rgba(0, 229, 255, 0.1) !important;
    color: var(--accent-primary) !important;
}

/* Tables */
.user-management-table th, .admin-management-table th, .form-container th {
    background-color: rgba(0, 229, 255, 0.1) !important;
    color: var(--accent-primary) !important;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-color: rgba(0, 229, 255, 0.2) !important;
}

.user-management-table td, .admin-management-table td, .form-container td {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.admin-management-table tr:nth-child(even), .form-container tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.admin-management-table tr:hover, .form-container tr:hover, .clickable-row:hover {
    background-color: rgba(0, 229, 255, 0.05) !important;
}

/* Password eye icon */
.password-toggle-icon, .toggle-password {
    color: var(--accent-primary) !important;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* Command Drawer Styles */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9990;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    display: block;
    opacity: 1;
}

.command-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(10, 14, 23, 0.98);
    border-left: 2px solid var(--accent-primary);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 9991;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
}

/* Global Open States (High Specificity) */
div.command-drawer.open,
#command-drawer.open,
#comms-console.open {
    right: 0 !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Comms Console Specific */
#comms-console {
    width: 500px;
    right: -520px;
    border-left-color: #00ffaa;
}

@media (max-width: 600px) {
    #comms-console {
        width: 100%;
        right: -105%;
    }
}

.drawer-header {
    padding: 20px;
    background: rgba(0, 229, 255, 0.1);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: var(--accent-primary);
    letter-spacing: 2px;
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.2s;
}

.drawer-close:hover {
    color: var(--accent-error);
}

.drawer-content {
    padding: 10px 0;
}

.drawer-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-section-title {
    padding: 15px 20px;
    color: var(--accent-secondary);
    font-family: var(--font-heading);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.02);
}

.drawer-link {
    display: block;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1em;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.drawer-link:hover {
    background: rgba(0, 229, 255, 0.08);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    padding-left: 25px;
}

.drawer-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Messaging & Comms Console */
.loader-dots span {
    animation: blink 1.4s infinite both;
    font-size: 2em;
    margin: 0 2px;
}
.loader-dots span:nth-child(2) { animation-delay: .2s; }
.loader-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

@media (max-width: 600px) {
    .comms-tabs {
        flex-wrap: wrap;
    }
    .tab-btn {
        flex: 1;
        padding: 8px 10px !important;
        font-size: 0.8em;
    }
    #message-display-container {
        height: 400px !important;
    }
}

/* Safety Dropdown */
.msg-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 5;
}

.msg-actions-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
}

.msg-actions:hover .msg-actions-btn { color: #fff; }

.msg-actions-content {
    display: none;
    position: absolute;
    right: 0;
    background: #1a2233;
    border: 1px solid #444;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
}

.msg-actions:hover .msg-actions-content {
    display: block;
}

.msg-actions-content button {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    background: transparent;
    color: #ccc;
    text-align: left;
    cursor: pointer;
    font-size: 0.85em;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
}

.msg-actions-content button:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.msg-actions-content button.report-btn:hover { color: #ffaa00; }
.msg-actions-content button.block-btn:hover { color: #ff3366; }

/* ==========================================
   LANDING PAGE REDESIGN STYLES (Option 1 - Compact & Autoplay)
   ========================================== */

/* Page layout adjustments to pull everything up */
.page-content-wrapper {
    margin-top: 65px !important;
}

/* Hero Section */
.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(15px, 3.5vw, 30px) 15px;
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-tagline {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    font-size: clamp(0.9em, 1.8vw, 1.1em);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.hero-main-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8em, 4vw, 2.8em);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.hero-description {
    font-size: clamp(0.85em, 1.5vw, 1em);
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 20px;
}

.hero-ctas {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 25px;
}

/* Pulsing primary CTA button */
.btn-cta-primary {
    font-family: var(--font-heading) !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700 !important;
    font-size: clamp(0.95em, 1.2vw, 1.1em) !important;
    background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
    border: 2px solid rgba(255, 215, 0, 0.6) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2) !important;
    color: #050b14 !important;
    padding: 12px 28px !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-decoration: none;
    display: inline-block;
    animation: cta-pulse 2s infinite alternate;
}

.btn-cta-primary:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6) !important;
    transform: translateY(-2px) scale(1.03) !important;
    border-color: #ffd700 !important;
}

.btn-cta-secondary {
    font-family: var(--font-heading) !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700 !important;
    font-size: clamp(0.95em, 1.2vw, 1.1em) !important;
    background: rgba(5, 11, 20, 0.6) !important;
    border: 2px solid var(--accent-primary) !important;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.15) !important;
    color: var(--accent-primary) !important;
    padding: 12px 28px !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    text-decoration: none;
    display: inline-block;
}

.btn-cta-secondary:hover {
    background: rgba(0, 229, 255, 0.1) !important;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
}

@keyframes cta-pulse {
    0% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.2); }
    100% { box-shadow: 0 0 24px rgba(255, 215, 0, 0.5); }
}

/* Video Showcase Container */
.showcase-video-wrapper {
    width: 100%;
    max-width: 680px;
    margin: 0 auto 30px auto;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), 0 0 25px rgba(0, 229, 255, 0.08);
    padding: 8px;
    box-sizing: border-box;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.showcase-video-wrapper:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--glass-shadow), 0 0 35px rgba(0, 229, 255, 0.18);
}

.video-container-ratio {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 5px;
    background: #000;
}

.video-container-ratio iframe,
.video-container-ratio video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Gameplay Grid */
.landing-features-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6em, 3vw, 2.2em);
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 25px 0 15px 0;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.gameplay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
    text-align: left;
}

.gameplay-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
}

.gameplay-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--glass-shadow), 0 0 20px rgba(0, 229, 255, 0.12);
    transform: translateY(-3px);
}

.card-img-wrapper {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.gameplay-card:hover .card-img-wrapper {
    border-bottom-color: var(--accent-primary);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gameplay-card:hover .card-img-wrapper img {
    transform: scale(1.06);
}

.card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.15em;
    color: #fff;
    margin: 0 0 6px 0;
    letter-spacing: 1px;
}

.gameplay-card:hover .card-title {
    color: var(--accent-primary);
}

.card-desc {
    font-size: 0.88em;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

/* Styled AdSense sponsor beacons */
.ad-sponsor-beacon {
    width: 100%;
    margin: 25px auto;
    max-width: 728px;
    padding: 12px;
    border-top: 1px dashed rgba(0, 229, 255, 0.2);
    border-bottom: 1px dashed rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.02);
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.ad-sponsor-label {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: #050b14; /* matches body bg */
    padding: 0 15px;
    font-family: var(--font-heading);
    font-size: 0.75em;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ad-sponsor-content {
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.2);
    font-family: var(--font-heading);
    font-size: 1.1em;
    letter-spacing: 1px;
}

/* Modal overlay and card for login */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 11, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal-card {
    background: rgba(10, 14, 23, 0.98);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 35px rgba(0, 229, 255, 0.3), var(--glass-shadow);
    width: 90%;
    max-width: 450px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.login-modal-overlay.active .login-modal-card {
    transform: translateY(0);
}

.login-modal-header {
    background: rgba(0, 229, 255, 0.1);
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-modal-header h3 {
    margin: 0;
    color: var(--accent-primary);
    font-size: 1.3em;
    letter-spacing: 2px;
}

.login-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.2s;
}

.login-modal-close:hover {
    color: var(--accent-error);
}

.login-modal-body {
    padding: clamp(20px, 5vw, 30px);
}

/* ==========================================================================
   READY-TO-BUILD HOLOGRAPHIC Blueprint slots
   ========================================================================== */
.station-slot.ready-to-build {
    border: 2px dashed rgba(0, 255, 170, 0.45) !important;
    background: rgba(0, 255, 170, 0.03) !important;
    animation: pulse-ready 2.5s infinite ease-in-out !important;
}

.station-slot.ready-to-build img {
    filter: grayscale(100%) brightness(40%) sepia(50%) hue-rotate(100deg);
    opacity: 0.35;
    transition: all 0.3s ease;
}

.station-slot.ready-to-build:hover {
    border: 2px dashed rgba(0, 255, 170, 0.8) !important;
    background: rgba(0, 255, 170, 0.1) !important;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.3) !important;
    cursor: pointer;
}

.station-slot.ready-to-build:hover img {
    filter: none;
    opacity: 0.8;
}

@keyframes pulse-ready {
    0% { box-shadow: 0 0 4px rgba(0, 255, 170, 0.15); border-color: rgba(0, 255, 170, 0.35); }
    50% { box-shadow: 0 0 12px rgba(0, 255, 170, 0.4); border-color: rgba(0, 255, 170, 0.7); }
    100% { box-shadow: 0 0 4px rgba(0, 255, 170, 0.15); border-color: rgba(0, 255, 170, 0.35); }
}




