/* International Fleet Network - Military Sci-Fi Theme */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

:root {
    /* Military Color Scheme */
    --bg-primary: #0c0f1a;
    --bg-secondary: #151a2b;
    --bg-card: #1a1f33;

    /* IF Brand Colors */
    --if-blue: #0a4d8c;
    --if-gold: #d4af37;
    --if-red: #8c0a0a;

    /* Status Colors */
    --status-active: #00ff88;
    --status-warning: #ffaa00;
    --status-danger: #ff3333;
    --status-offline: #666;

    /* Text Colors */
    --text-primary: #e8edf5;
    --text-secondary: #8a9bb5;
    --text-highlight: #4a9eff;

    /* Borders */
    --border-standard: #2a3f5f;
    --border-accent: #4a9eff;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Military Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(74, 158, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 158, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Subtle scanline effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
    opacity: 0.3;
}

/* Container Layouts */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: rgba(26, 31, 51, 0.95);
    border: 2px solid var(--border-standard);
    border-radius: 4px;
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.dashboard-container {
    max-width: 1200px;
    width: 100%;
    padding: 20px;
}

/* Logo Styles */
.if-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(74, 158, 255, 0.5));
}

/* Typography */
h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    color: var(--if-gold);
    letter-spacing: 2px;
}

h1 {
    font-size: 32px;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

h2 {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-standard);
    padding-bottom: 10px;
}

h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-standard);
    border-radius: 2px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--border-accent);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

/* Buttons */
button, .btn {
    font-family: 'Rajdhani', sans-serif;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: var(--if-blue);
    color: var(--text-primary);
    border: 1px solid var(--border-accent);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover, .btn:hover {
    background: #0d5fa8;
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.4);
    transform: translateY(-2px);
}

button:active, .btn:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.btn-logout {
    background: var(--if-red);
    border-color: #a51010;
}

.btn-logout:hover {
    background: #a51010;
    box-shadow: 0 0 20px rgba(140, 10, 10, 0.4);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
}

.flash {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-weight: 600;
    animation: slideInRight 0.5s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.flash.error {
    background: var(--if-red);
    border: 1px solid #a51010;
}

.flash.success {
    background: #0a5c2e;
    border: 1px solid var(--status-active);
}

.flash.info {
    background: var(--if-blue);
    border: 1px solid var(--border-accent);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-standard);
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-standard);
}

.card-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Navigation */
.nav-bar {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-standard);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    transition: color 0.3s ease;
    padding: 8px 15px;
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--text-highlight);
    background: rgba(74, 158, 255, 0.1);
}

.nav-links a.active {
    color: var(--if-gold);
    border-bottom: 2px solid var(--if-gold);
}

/* User Info Badge */
.user-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-standard);
    border-radius: 2px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--if-gold);
}

.user-rank {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.clearance-badge {
    padding: 4px 12px;
    background: var(--if-blue);
    border: 1px solid var(--border-accent);
    border-radius: 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Content Displays */
.content-display {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-standard);
    border-radius: 4px;
    padding: 30px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    max-height: 600px;
    overflow-y: auto;
}

.content-display::-webkit-scrollbar {
    width: 8px;
}

.content-display::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.content-display::-webkit-scrollbar-thumb {
    background: var(--border-standard);
    border-radius: 4px;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s ease-in-out infinite;
}

.status-active {
    background: var(--status-active);
    box-shadow: 0 0 10px var(--status-active);
}

.status-warning {
    background: var(--status-warning);
    box-shadow: 0 0 10px var(--status-warning);
}

.status-danger {
    background: var(--status-danger);
    box-shadow: 0 0 10px var(--status-danger);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 30px 20px;
    }

    .nav-bar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .user-badge {
        width: 100%;
        justify-content: center;
    }

    h1 {
        font-size: 24px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Links */
a.link-secondary {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

a.link-secondary:hover {
    color: var(--text-highlight);
}

/* ==================== HOMEPAGE STYLES ==================== */

/* Two-Column Layout */
.home-layout {
    display: flex;
    min-height: 100vh;
    max-height: 100vh;
    width: 100vw;
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Left Sidebar - Fixed */
.home-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(26, 31, 51, 0.98);
    border-right: 2px solid var(--if-gold);
    padding: 30px 20px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar-top {
    flex-grow: 1;
}

.sidebar-bottom {
    flex-shrink: 0;
    margin-top: 20px;
}

/* Sidebar Scrollbar */
.home-sidebar::-webkit-scrollbar {
    width: 6px;
}

.home-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.home-sidebar::-webkit-scrollbar-thumb {
    background: var(--if-blue);
    border-radius: 3px;
}

.home-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--if-gold);
}

/* Logo - Small */
.if-logo-small {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(74, 158, 255, 0.6));
}

/* Title - Small */
.home-title-small {
    font-size: 24px;
    margin-bottom: 8px;
    text-align: center;
    color: var(--if-gold);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Subtitle - Small */
.home-subtitle-small {
    font-size: 14px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-secondary);
}

/* Fleet Statistics Section */
.fleet-stats {
    margin: 20px 0;
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-standard);
    border-radius: 4px;
}

.stat-item {
    margin-bottom: 15px;
    text-align: center;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--if-gold);
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    text-transform: uppercase;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* War Alerts */
.war-alerts {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-standard);
    border-radius: 4px;
    max-height: 350px;
    overflow-y: auto;
}

.war-alerts h3 {
    font-size: 12px;
    color: var(--if-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.alert-item {
    padding: 10px;
    margin-bottom: 8px;
    border-left: 3px solid var(--if-blue);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    font-size: 12px;
}

.alert-item:last-child {
    margin-bottom: 0;
}

/* Alert severity indicators */
.alert-high {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.alert-medium {
    border-left-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.alert-low {
    border-left-color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

.alert-message {
    color: var(--text-primary);
    font-weight: 500;
}

.alert-time {
    color: var(--text-secondary);
    font-size: 10px;
    margin-top: 5px;
}

/* War Alerts Scrollbar */
.war-alerts::-webkit-scrollbar {
    width: 4px;
}

.war-alerts::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.war-alerts::-webkit-scrollbar-thumb {
    background: var(--if-blue);
    border-radius: 2px;
}

/* Access Button in Sidebar */
.btn-access {
    margin-top: 0;
    background: var(--if-gold);
    color: #000;
    border-color: #e6c556;
    width: 100%;
    font-weight: 700;
}

.btn-access:hover {
    background: #e6c556;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    color: #000;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: 15px;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}

.sidebar-footer p {
    margin: 5px 0;
}

/* Right Carousel Area */
.home-carousel-area {
    margin-left: 280px;
    flex: 1;
    width: calc(100% - 280px);
    min-height: 100vh;
    max-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ==================== NEWS CAROUSEL ==================== */

.carousel-container {
    margin: 40px 0;
    position: relative;
    width: 100%;
}

/* Fullscreen Carousel Styles */
.carousel-fullscreen {
    width: 100%;
    height: 100vh;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border-radius: 4px;
}

.carousel-wrapper-fullscreen {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    border-radius: 0;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 600px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel-slide-fullscreen {
    min-height: 100vh;
    height: 100vh;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.news-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-title-section {
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-bottom: 3px solid var(--if-gold);
}

.news-title {
    font-size: 42px;
    font-weight: 900;
    color: var(--if-gold);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.news-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    margin-bottom: 0;
}

.carousel-content-section {
    background: rgba(0, 0, 0, 0.85);
    padding: 30px;
    backdrop-filter: blur(5px);
}

.news-content {
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.news-content p {
    margin-bottom: 15px;
}

.news-quote {
    font-style: italic;
    color: var(--text-highlight);
    padding-left: 20px;
    border-left: 3px solid var(--if-blue);
}

.news-attribution {
    text-align: right;
    color: var(--text-secondary);
    font-size: 14px;
}

.recruitment-cta {
    color: var(--if-gold);
    font-weight: 700;
}

.news-motto {
    color: var(--status-active);
}

.news-rest {
    color: var(--text-secondary);
    font-style: italic;
}

/* Carousel Controls - Hidden */
.carousel-controls {
    display: none;
}

.carousel-btn {
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid var(--border-accent);
    color: var(--text-primary);
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.carousel-btn:hover {
    background: rgba(74, 158, 255, 0.4);
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.3);
}

.carousel-indicators {
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(74, 158, 255, 0.3);
    border: 1px solid var(--border-accent);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--if-gold);
    box-shadow: 0 0 10px var(--if-gold);
}

.indicator:hover {
    background: rgba(74, 158, 255, 0.6);
}

/* Responsive carousel styles */
@media (max-width: 768px) {
    .carousel-wrapper {
        min-height: 400px;
    }

    .carousel-slide {
        min-height: 400px;
    }

    .carousel-title-section,
    .carousel-content-section {
        padding: 20px;
    }

    .news-title {
        font-size: 28px;
    }
}

/* Responsive Home Page - Mobile/Tablet */
@media (max-width: 1024px) {
    .home-layout {
        flex-direction: column;
    }

    .home-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        border-right: none;
        border-bottom: 2px solid var(--if-gold);
        padding: 20px;
    }

    .home-carousel-area {
        margin-left: 0;
        width: 100%;
        height: 70vh;
        min-height: 70vh;
    }

    .carousel-fullscreen {
        height: 70vh;
    }

    .carousel-wrapper-fullscreen {
        height: 70vh;
        min-height: 70vh;
    }

    .carousel-slide-fullscreen {
        height: 70vh;
        min-height: 70vh;
    }

    .if-logo-small {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .home-title-small {
        font-size: 20px;
    }

    .home-subtitle-small {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .fleet-stats {
        margin: 15px 0;
        padding: 15px 10px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 10px;
    }

    .war-alerts {
        margin: 15px 0;
        max-height: 250px;
    }

    .stat-number {
        font-size: 20px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .home-carousel-area {
        height: 50vh;
        min-height: 50vh;
    }

    .carousel-fullscreen,
    .carousel-wrapper-fullscreen,
    .carousel-slide-fullscreen {
        height: 50vh;
        min-height: 50vh;
    }

    .news-title {
        font-size: 22px;
    }

    .carousel-title-section,
    .carousel-content-section {
        padding: 15px;
    }
}

/* ==================== PAGINATION CONTROLS ==================== */

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-standard);
}

.pagination-btn {
    padding: 10px 20px;
    font-size: 14px;
    min-width: 120px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

/* ==================== JOURNAL SIDEBAR ==================== */

.journal-layout {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.journal-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-standard);
    border-radius: 4px;
    padding: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.journal-sidebar h3 {
    color: var(--if-gold);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-standard);
}

.scrap-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scrap-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-standard);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.scrap-nav-item:hover {
    background: rgba(74, 158, 255, 0.15);
    border-color: var(--if-blue);
    transform: translateX(5px);
}

.scrap-nav-item.active {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.25), rgba(212, 175, 55, 0.15));
    border-color: var(--if-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.scrap-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--if-blue);
    color: var(--bg-primary);
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    font-family: 'Share Tech Mono', monospace;
}

.scrap-nav-item.active .scrap-number {
    background: var(--if-gold);
    color: var(--bg-primary);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.scrap-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.journal-content {
    flex: 1;
    min-width: 0;
    animation: fadeInContent 0.4s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar for sidebar */
.journal-sidebar::-webkit-scrollbar {
    width: 8px;
}

.journal-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.journal-sidebar::-webkit-scrollbar-thumb {
    background: var(--if-blue);
    border-radius: 4px;
}

.journal-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--if-gold);
}

/* Responsive design for journal sidebar */
@media (max-width: 900px) {
    .journal-layout {
        flex-direction: column;
        gap: 20px;
    }

    .journal-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .scrap-navigation {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .scrap-nav-item {
        flex: 0 1 calc(50% - 5px);
        padding: 10px;
    }

    .scrap-nav-item:hover {
        transform: translateX(0);
    }
}

@media (max-width: 600px) {
    .journal-layout {
        padding: 15px;
    }

    .scrap-nav-item {
        flex: 1 1 100%;
    }

    .journal-sidebar h3 {
        font-size: 14px;
    }
}

/* ==================== ADMIN PANEL ==================== */

.admin-container {
    max-width: 1000px;
    width: 100%;
    padding: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th {
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid var(--border-standard);
    padding: 12px;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--if-gold);
}

.admin-table td {
    border: 1px solid var(--border-standard);
    padding: 12px;
    font-family: 'Share Tech Mono', monospace;
}

.admin-table input[type="tel"],
.admin-table input[type="text"] {
    width: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-standard);
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
}

.admin-table input[type="tel"]:focus,
.admin-table input[type="text"]:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.3);
}

.override-pins {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--if-gold);
    padding: 20px;
    margin-top: 30px;
    border-radius: 4px;
}

.override-pins h3 {
    color: var(--if-gold);
    margin-bottom: 15px;
}

.pin-display {
    font-family: 'Share Tech Mono', monospace;
    font-size: 24px;
    color: var(--status-active);
    letter-spacing: 4px;
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--status-active);
    border-radius: 2px;
    margin: 10px 0;
}

/* ==================== AUTHENTICATION GAMES ==================== */

.game-container {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 30px;
    background: rgba(26, 31, 51, 0.95);
    border: 2px solid var(--border-standard);
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.game-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 10px;
}

.game-instructions {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.6;
}

.game-canvas {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--border-accent);
    margin: 20px auto;
    display: block;
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.2);
    max-width: 100%;
    height: auto;
}

.game-grid {
    display: grid;
    gap: 10px;
    margin: 20px auto;
    width: fit-content;
}

.grid-5x5 {
    grid-template-columns: repeat(5, 60px);
}

.grid-cell {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--border-standard);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grid-cell:hover {
    background: rgba(74, 158, 255, 0.2);
    border-color: var(--border-accent);
}

.grid-cell.player {
    background: var(--if-blue);
    border-color: var(--border-accent);
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.5);
}

.grid-cell.goal {
    background: var(--if-gold);
    border-color: var(--if-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.controls {
    text-align: center;
    margin-top: 20px;
}

.control-btn {
    margin: 5px;
    padding: 15px 30px;
    font-size: 18px;
    min-width: 60px;
}

.puzzle-pieces-container {
    display: grid;
    grid-template-columns: repeat(2, 150px);
    gap: 20px;
    margin: 30px auto;
    width: fit-content;
}

.puzzle-piece {
    width: 150px;
    height: 150px;
    background: var(--if-blue);
    border: 3px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    cursor: move;
    transition: all 0.3s ease;
}

.puzzle-piece:hover {
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.5);
    transform: scale(1.05);
}

.puzzle-piece.dragging {
    opacity: 0.5;
}

/* ==================== STRATCOM CONTROL PANEL ==================== */

.stratcom-container {
    max-width: 1000px;
    width: 100%;
    padding: 40px;
    background: rgba(26, 31, 51, 0.98);
    border: 3px solid var(--if-gold);
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.stratcom-title {
    text-align: center;
    font-size: 48px;
    color: var(--status-danger);
    text-shadow: 0 0 20px var(--status-danger);
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

.stratcom-warning {
    background: rgba(255, 51, 51, 0.1);
    border: 2px solid var(--status-danger);
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    font-size: 16px;
    color: var(--status-danger);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.control-panel {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--border-standard);
    padding: 40px;
    margin: 30px 0;
    border-radius: 4px;
}

.deactivate-btn {
    width: 100%;
    padding: 30px;
    font-size: 24px;
    background: var(--status-danger);
    border-color: #ff6666;
    margin-top: 20px;
    animation: pulse 3s ease-in-out infinite;
}

.deactivate-btn:hover {
    background: #ff6666;
    box-shadow: 0 0 40px rgba(255, 51, 51, 0.6);
}

.victory-message {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid var(--status-active);
    padding: 40px;
    margin: 30px 0;
    text-align: center;
    border-radius: 4px;
}

.victory-message h2 {
    color: var(--status-active);
    font-size: 36px;
    margin-bottom: 20px;
}

.victory-message p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
}

/* ==================== DEPLOYMENT DASHBOARD ==================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-standard);
}

.dashboard-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--text-primary);
    font-size: 28px;
}

/* Stat Cards Grid */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-standard);
    border-radius: 4px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.stat-card-active {
    border-color: var(--status-active);
}

.stat-card-warning {
    border-color: var(--status-warning);
}

.stat-card-personnel {
    border-color: var(--if-blue);
}

.stat-icon {
    font-size: 48px;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Single Column Deployment Grid */
.deployment-grid-single {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-card-large {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-standard);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card-large:hover {
    border-color: var(--if-blue);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.dashboard-card-content-large {
    padding: 30px;
}

/* Larger Fleet Items */
.fleet-item-large {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
    font-size: 15px;
}

.fleet-item-large:last-child {
    border-bottom: none;
}

.fleet-item-large .fleet-name {
    color: var(--text-secondary);
    font-size: 15px;
}

.fleet-item-large .fleet-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}

/* Larger Sector Items */
.sector-item-large {
    margin-bottom: 30px;
}

.sector-item-large:last-child {
    margin-bottom: 0;
}

.sector-item-large .sector-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sector-item-large .sector-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}

.sector-item-large .sector-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.progress-bar-large {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-standard);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

/* Larger System Items */
.system-item-large {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
    font-size: 15px;
}

.system-item-large:last-child {
    border-bottom: none;
}

.system-item-large .system-name {
    flex: 1;
    color: var(--text-secondary);
    font-size: 15px;
}

/* Larger Operation Items */
.operation-item-large {
    padding: 20px 0;
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
}

.operation-item-large:last-child {
    border-bottom: none;
}

.operation-item-large .operation-name {
    display: block;
    color: var(--if-gold);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}

.operation-item-large .operation-desc {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.dashboard-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-standard);
    border-radius: 4px;
    overflow: hidden;
}

.dashboard-card-header {
    background: rgba(10, 77, 140, 0.2);
    border-bottom: 1px solid var(--border-standard);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--if-gold);
}

.card-badge {
    background: var(--if-blue);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-card-content {
    padding: 20px;
}

/* Fleet Items */
.fleet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
}

.fleet-item:last-child {
    border-bottom: none;
}

.fleet-name {
    color: var(--text-secondary);
    font-size: 13px;
}

.fleet-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

/* Sector Items */
.sector-item {
    margin-bottom: 20px;
}

.sector-item:last-child {
    margin-bottom: 0;
}

.sector-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sector-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
}

.sector-count {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Progress Bar */
.progress-bar {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-standard);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--if-blue), var(--if-gold));
    height: 100%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

/* Accordion Sections */
.accordion-sections {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-standard);
    border-radius: 4px;
    overflow: hidden;
}

.accordion-header {
    padding: 18px 20px;
    background: rgba(10, 77, 140, 0.15);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.accordion-header:hover {
    background: rgba(10, 77, 140, 0.25);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.accordion-icon {
    font-size: 12px;
    color: var(--if-gold);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(90deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 20px;
}

/* System Items */
.system-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
}

.system-item:last-child {
    border-bottom: none;
}

.system-status {
    font-size: 20px;
}

.system-status.status-active {
    color: var(--status-active);
    animation: pulse 2s ease-in-out infinite;
}

.system-status.status-warning {
    color: var(--status-warning);
    animation: pulse 2s ease-in-out infinite;
}

.system-name {
    flex: 1;
    color: var(--text-secondary);
    font-size: 13px;
}

.system-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
}

/* Operation Items */
.operation-item {
    padding: 15px 0;
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
}

.operation-item:last-child {
    border-bottom: none;
}

.operation-name {
    display: block;
    color: var(--if-gold);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 5px;
}

.operation-desc {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Raw Content */
.raw-content {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-standard);
    padding: 20px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
}

/* ==================== TACTICAL TERMINAL EMULATOR ==================== */

.terminal-window {
    background: #0a0e0f;
    border: 3px solid #1a2f3f;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.2),
                inset 0 0 100px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
    max-width: 95%;
    margin: 0 auto;
}

.terminal-header {
    background: linear-gradient(180deg, #1a2f3f 0%, #0f1a24 100%);
    border-bottom: 2px solid #00ff88;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #00ff88;
    letter-spacing: 1px;
}

.terminal-icon {
    font-size: 16px;
}

.terminal-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #66ffaa;
}

.terminal-meta .separator {
    margin: 0 10px;
    color: #00ff88;
}

.terminal-screen {
    background: #000000;
    padding: 25px;
    min-height: 750px;
    max-height: 850px;
    overflow-y: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #00ff88;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.7);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Phosphor glow effect on terminal text */
.terminal-screen * {
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.terminal-output {
    position: relative;
    z-index: 2;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

.terminal-line {
    margin-bottom: 8px;
}

.terminal-line.blank {
    height: 8px;
}

/* Command Input Area */
.command-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: #000000;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    margin-top: auto;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #00ff88;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.7);
}

.command-input::placeholder {
    color: #44bb77;
    opacity: 0.5;
}

.input-cursor {
    display: inline-block;
    background: #00ff88;
    color: #000000;
    animation: blink 1s step-end infinite;
    padding: 0 3px;
    margin-left: -20px;
    pointer-events: none;
}

.prompt {
    color: #66ffaa;
    font-weight: 700;
    margin-right: 8px;
}

.command {
    color: #00ff88;
}

.command-hint {
    color: #44bb77;
    font-style: italic;
}

.cursor {
    display: inline-block;
    background: #00ff88;
    color: #000000;
    animation: blink 1s step-end infinite;
    margin-left: 4px;
    padding: 0 3px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Terminal Table */
.terminal-table {
    margin: 15px 0;
}

.table-header {
    display: grid;
    grid-template-columns: 100px 120px 1fr 100px;
    gap: 15px;
    color: #00ff88;
    font-weight: 700;
    margin-bottom: 8px;
}

.table-divider {
    color: #00ff88;
    margin-bottom: 10px;
    opacity: 0.5;
}

.table-row {
    display: grid;
    grid-template-columns: 100px 120px 1fr 100px;
    gap: 15px;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    padding-left: 10px;
}

.table-row:hover {
    background: rgba(0, 255, 136, 0.1);
    border-left-color: #00ff88;
    padding-left: 15px;
}

.col-id {
    color: #66ffaa;
}

.col-date {
    color: #00ffaa;
}

.col-type {
    color: #88ffbb;
}

.col-status {
    color: #00ff88;
    font-weight: 700;
}

/* Entry Detail View */
.entry-detail {
    position: relative;
    z-index: 2;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.entry-border-top,
.entry-border-bottom {
    color: #00ff88;
    margin: 8px 0;
    opacity: 0.7;
}

.entry-header {
    font-size: 16px;
    font-weight: 700;
    color: #00ff88;
    margin-bottom: 5px;
}

.entry-date {
    font-size: 13px;
    color: #66ffaa;
}

.entry-content {
    color: #88ffbb;
    white-space: pre-wrap;
    line-height: 1.8;
    margin: 15px 0;
    padding: 15px;
    background: rgba(0, 255, 136, 0.05);
    border-left: 3px solid #00ff88;
}

/* Scanline Effect */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.3) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 3;
    opacity: 0.15;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(4px);
    }
}

/* CRT Screen flicker effect */
@keyframes flicker {
    0% {
        opacity: 0.95;
    }
    5% {
        opacity: 1;
    }
    10% {
        opacity: 0.98;
    }
    15% {
        opacity: 1;
    }
    20% {
        opacity: 0.97;
    }
    100% {
        opacity: 1;
    }
}

.terminal-window {
    animation: flicker 3s infinite;
}

/* Custom Scrollbar for Terminal */
.terminal-screen::-webkit-scrollbar {
    width: 10px;
}

.terminal-screen::-webkit-scrollbar-track {
    background: #0a0e0f;
    border-left: 1px solid #00ff88;
}

.terminal-screen::-webkit-scrollbar-thumb {
    background: #00ff88;
    box-shadow: 0 0 5px rgba(0, 255, 136, 0.7);
}

.terminal-screen::-webkit-scrollbar-thumb:hover {
    background: #00ffaa;
}

/* ==================== RESPONSIVE UPDATES ==================== */

@media (max-width: 768px) {
    .home-container {
        padding: 30px 20px;
    }

    .if-logo-large {
        width: 150px;
        height: 150px;
    }

    .home-title {
        font-size: 32px;
    }

    .carousel-wrapper {
        min-height: 400px;
    }

    .news-title {
        font-size: 22px;
    }

    .carousel-controls {
        flex-wrap: wrap;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-btn {
        width: 100%;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }

    .game-container {
        padding: 20px;
    }

    .grid-5x5 {
        grid-template-columns: repeat(5, 50px);
    }

    .grid-cell {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .stratcom-container {
        padding: 20px;
    }

    .stratcom-title {
        font-size: 32px;
    }

    .deactivate-btn {
        font-size: 18px;
        padding: 20px;
    }
}
