/* ==========================================================================
   WILDKAMERAS DESIGN SYSTEM - DARK MODE & GLASSMORPHISM
   ========================================================================== */

:root {
    --bg-dark: #090d16;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #10b981;
    --accent-boar: #f59e0b;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    line-height: 1.5;
    padding-bottom: 20px;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    border-radius: var(--radius-md);
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    padding: 35px 30px;
    text-align: center;
}

.brand-logo {
    font-size: 52px;
    margin-bottom: 10px;
}

.brand h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.brand p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea, .form-group input[type="text"], .form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 44px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus, .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   BUTTONS & ALERTS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
}
.btn-warning:hover {
    background: #d97706;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 36px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    margin-top: 15px;
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.logo-text .subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.nav-tabs {
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.5);
    padding: 5px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */

.bottom-nav,
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)) 6px;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.6);
}

.mobile-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.mobile-tab-btn .nav-icon {
    font-size: 20px;
    line-height: 1;
}

.mobile-tab-btn .nav-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-tab-btn.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.18);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.2);
}

.mobile-tab-btn:hover {
    color: #ffffff;
}

.mobile-only { display: none; }

/* ==========================================================================
   DASHBOARD & METRICS
   ========================================================================== */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
}

.metric-icon {
    font-size: 26px;
    background: rgba(255, 255, 255, 0.05);
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.metric-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.metric-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
}

.highlight-card {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(30, 41, 59, 0.7) 100%);
}

.border-highlight {
    border: 1px solid rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(30, 41, 59, 0.7) 100%);
}

/* ==========================================================================
   TABLES & CARDS
   ========================================================================== */

.section-card {
    padding: 25px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.align-center {
    align-items: center;
}

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

.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(15, 23, 42, 0.4);
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    color: var(--primary);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.action-btn-group {
    display: flex;
    gap: 6px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.row-inactive-24h {
    background-color: rgba(239, 68, 68, 0.12) !important;
}

.row-inactive-24h:hover {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

.row-quota-warning {
    background-color: rgba(234, 179, 8, 0.12) !important;
}

.row-quota-warning:hover {
    background-color: rgba(234, 179, 8, 0.2) !important;
}

.row-ignored {
    background-color: rgba(100, 116, 139, 0.12) !important;
    opacity: 0.75;
}

.row-ignored:hover {
    background-color: rgba(100, 116, 139, 0.2) !important;
    opacity: 1;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 34px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .boar-slider {
    background-color: var(--accent-boar);
}

input:checked + .ignore-slider {
    background-color: #64748b;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* ==========================================================================
   MOBILE CARDS VIEW (FOR SMARTPHONES)
   ========================================================================== */

.mobile-cards-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.mobile-cam-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.mobile-cam-card.inactive-24h {
    border: 2px solid rgba(239, 68, 68, 0.7) !important;
    background: rgba(45, 20, 25, 0.85) !important;
}

.mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.mobile-cam-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
}

.mobile-cam-user {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.mobile-card-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.mobile-toggles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    background: rgba(15, 23, 42, 0.4);
    padding: 10px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.mobile-toggle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.mobile-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

/* ==========================================================================
   GALERIE & MODAL
   ========================================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-card {
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.gallery-thumb-wrapper {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
}

.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-cam-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.gallery-info {
    padding: 14px;
}

.gallery-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.gallery-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 600px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-lg {
    max-width: 900px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-main);
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.image-modal-content {
    display: flex;
    flex-direction: column;
}

.mail-text-box {
    background: rgba(15, 23, 42, 0.8);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-muted);
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
}

/* ==========================================================================
   FULLSCREEN LIGHTBOX & INTERACTIVE ZOOM VIEWER
   ========================================================================== */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 8, 18, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100000;
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

.lightbox-overlay.active {
    display: flex;
    flex-direction: column;
    animation: lightboxFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Floating Top Toolbar */
.lightbox-toolbar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 100002;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
}

.lightbox-cam-badge {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 4px 10px;
    border-radius: 8px;
}

.lightbox-time-badge {
    font-size: 12px;
    color: var(--text-muted);
}

.lightbox-zoom-indicator {
    font-size: 11px;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lightbox-tool-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.lightbox-tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.lightbox-tool-btn.lightbox-btn-close {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 18px;
}

.lightbox-tool-btn.lightbox-btn-close:hover {
    background: rgba(239, 68, 68, 0.4);
    color: #fff;
}

/* Navigation Buttons */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.lightbox-nav-btn:hover {
    background: rgba(56, 189, 248, 0.3);
    border-color: #38bdf8;
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Side Navigation Click Zones */
.lightbox-side-zone {
    position: absolute;
    top: 60px;
    bottom: 40px;
    width: 25%;
    max-width: 340px;
    z-index: 100000;
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-side-zone:hover {
    opacity: 1;
}

.lightbox-side-left {
    left: 0;
    justify-content: flex-start;
    padding-left: 20px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.45), transparent);
}

.lightbox-side-right {
    right: 0;
    justify-content: flex-end;
    padding-right: 20px;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.45), transparent);
}

.lightbox-nav-indicator {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.lightbox-side-zone:hover .lightbox-nav-indicator {
    transform: scale(1.12);
    background: rgba(56, 189, 248, 0.35);
    color: #ffffff;
    border-color: #38bdf8;
}

@media (max-width: 768px) {
    .lightbox-side-zone {
        width: 35%;
        opacity: 0.6;
    }
    .lightbox-nav-indicator {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Viewport & Interactive Zoom Canvas */
.lightbox-viewport {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.lightbox-viewport.is-dragging {
    cursor: grabbing !important;
}

.lightbox-img-container {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.05s ease-out;
}

.lightbox-img-container img {
    max-width: 92vw;
    max-height: 86vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* Semi-Transparent Floating Legend */
.lightbox-legend {
    position: absolute;
    bottom: 24px;
    left: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    z-index: 100002;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-legend.minimized {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
}

.lightbox-legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.lightbox-legend-minimize {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.lightbox-legend-minimize:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.lightbox-legend-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.legend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legend-label {
    color: var(--text-muted);
    font-size: 12px;
}

.legend-val {
    color: #f1f5f9;
    font-weight: 500;
}

@media (max-width: 768px) {
    .lightbox-toolbar {
        top: 10px; left: 10px; right: 10px;
        height: 46px;
        padding: 0 10px;
    }
    .lightbox-cam-badge { font-size: 12px; padding: 2px 6px; }
    .lightbox-time-badge { display: none; }
    .lightbox-legend {
        bottom: 16px; left: 16px; right: 16px;
        width: auto;
        padding: 12px 14px;
    }
    .lightbox-nav-btn { width: 42px; height: 42px; font-size: 18px; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 25px; }
.mb-2 { margin-bottom: 10px; }
.mb-4 { margin-bottom: 25px; }
.ml-1 { margin-left: 5px; }
.ml-2 { margin-left: 10px; }
.ml-3 { margin-left: 15px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }

/* LOGS TERMINAL VIEW */
.logs-toolbar {
    background: rgba(15, 23, 42, 0.4);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.terminal-wrapper {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
    position: relative;
}

.terminal-content {
    font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #c9d1d9;
    background: transparent;
    border: none;
    margin: 0;
    max-height: 650px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ==========================================================================
   COLOR SYNTAX HIGHLIGHTING FOR CONTAINER LOGS
   ========================================================================== */

.log-ts {
    color: #64748b;
    font-weight: 500;
}

.log-adapter {
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    display: inline-block;
}

.log-adapter-web_interface {
    color: #38bdf8; /* Neon Cyan Blue */
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.1);
}

.log-adapter-telegram_bot {
    color: #c084fc; /* Electric Violet / Purple */
    border: 1px solid rgba(192, 132, 252, 0.3);
    background: rgba(192, 132, 252, 0.1);
}

.log-adapter-mail_server {
    color: #fbbf24; /* Warm Gold / Amber */
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.1);
}

.log-adapter-ftp_server {
    color: #34d399; /* Emerald Green */
    border: 1px solid rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.1);
}

.log-adapter-megadetector {
    color: #f472b6; /* Hot Pink */
    border: 1px solid rgba(244, 114, 182, 0.3);
    background: rgba(244, 114, 182, 0.1);
}

.log-adapter-db {
    color: #fb923c; /* Coral Orange */
    border: 1px solid rgba(251, 146, 60, 0.3);
    background: rgba(251, 146, 60, 0.1);
}

.log-level {
    font-weight: 700;
}

.log-level-INFO {
    color: #38bdf8;
}

.log-level-DEBUG {
    color: #94a3b8;
}

.log-level-WARN {
    color: #facc15;
}

.log-level-ERROR {
    color: #f87171;
}

@media (max-width: 1200px) and (min-width: 769px) {
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important; /* Space for fixed bottom navigation bar */
    }

    .desktop-only {
        display: none !important;
    }

    .bottom-nav,
    .mobile-nav-bar {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
    }

    .navbar {
        padding: 12px 16px;
        margin-top: 10px;
        margin-bottom: 15px;
    }

    .logo-text h1 {
        font-size: 17px;
    }
    
    .logo-icon {
        font-size: 26px;
    }

    .user-menu {
        gap: 8px;
    }
    .user-badge {
        display: none;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .metric-card {
        padding: 14px;
        gap: 12px;
    }

    .metric-icon {
        width: 48px;
        height: 48px;
        font-size: 26px;
    }

    .metric-value {
        font-size: 22px;
    }

    .section-card {
        padding: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .filter-controls {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

    .image-modal-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery-info {
        padding: 10px;
    }

    .gallery-title {
        font-size: 12px;
    }

    .logs-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .mt-2-mobile {
        margin-top: 10px;
    }

    #revier-map {
        height: calc(100vh - 180px) !important;
        min-height: 420px;
    }
    
    .map-popup-card {
        max-width: 270px !important;
    }
}

/* Carousel strip for mobile & touch */
.cam-popup-carousel-strip {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.cam-popup-carousel-strip::-webkit-scrollbar {
    height: 4px;
}

.cam-popup-carousel-strip::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

/* ==========================================================================
   REVIERKARTE & LEAFLET CUSTOM MARKERS & STYLING
   ========================================================================== */
.custom-cam-leaflet-icon {
    background: transparent !important;
    border: none !important;
}

.cam-map-marker-container {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: grab;
}

.cam-map-marker-container:active {
    cursor: grabbing;
}

/* Drehbarer Kamera-Icon Wrapping Container */
.cam-rotating-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.cam-rotating-icon-wrap:hover {
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.8)) brightness(1.15);
}

/* SVG Kamerasymbol in Grün / Rot */
.cam-svg-icon.status-online {
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.8));
}

.cam-svg-icon.status-offline {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8));
}

/* Kamera Name Tag unter dem Symbol */
.cam-name-tag {
    margin-top: 3px;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.cam-name-tag.status-online {
    background: rgba(6, 78, 59, 0.9);
    border: 1px solid #10b981;
    color: #a7f3d0;
}

.cam-name-tag.status-offline {
    background: rgba(127, 29, 29, 0.9);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(14px) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.95) !important;
}

.map-popup-card button {
    font-size: 11px !important;
}

/* ==========================================================================
   TOP-RIGHT LIVE WIND & WEATHER OVERLAY
   ========================================================================== */

#map-wind-topright-widget {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#map-wind-topright-widget:hover {
    transform: scale(1.03);
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}

.live-wind-dot {
    color: #10b981;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    animation: liveWindPulse 2s infinite ease-in-out;
}

@keyframes liveWindPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.92); }
}

.center-wind-details-card {
    display: none;
    pointer-events: auto;
    position: absolute;
    top: 65px;
    right: 15px;
    width: 230px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75);
    z-index: 1001;
}

.center-wind-details-card.active {
    display: block;
}

/* ==========================================================================
   CENTER RETICLE & 50M DISTANCE RINGS (SCHUSSENTFERNUNG)
   ========================================================================== */

.map-center-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    user-select: none;
}

.reticle-wind-arrow-wrap {
    position: absolute;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
    transform-origin: center center;
}

.reticle-wind-arrow-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.95)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.85));
}

.reticle-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 10px #ef4444, 0 0 20px rgba(239, 68, 68, 0.9);
    border: 1.5px solid #ffffff;
    z-index: 3;
}

.reticle-crosshair-h {
    position: absolute;
    width: 24px;
    height: 1.5px;
    background: rgba(239, 68, 68, 0.85);
    box-shadow: 0 0 4px rgba(0,0,0,0.8);
    z-index: 2;
}

.reticle-crosshair-v {
    position: absolute;
    width: 1.5px;
    height: 24px;
    background: rgba(239, 68, 68, 0.85);
    box-shadow: 0 0 4px rgba(0,0,0,0.8);
    z-index: 2;
}

.distance-ring-label {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    border: 1px solid currentColor;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ==========================================================================
   MAP FULLSCREEN MODE
   ========================================================================== */

#revier-map-container.fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #0f172a !important;
}

#revier-map-container.fullscreen-active #revier-map {
    height: 100vh !important;
    width: 100vw !important;
    border-radius: 0 !important;
    border: none !important;
}

#map-fullscreen-floating-bar {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10000;
    gap: 10px;
    align-items: center;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

#revier-map-container.fullscreen-active #map-fullscreen-floating-bar {
    display: flex;
}

/* ==========================================================================
   DASHBOARD CAMERA CARDS & FILMSTRIP (MODERN CARD VIEW)
   ========================================================================== */

.dashboard-cam-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.dash-cam-card {
    background: rgba(26, 34, 52, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md, 14px);
    padding: 22px 26px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-cam-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.dash-cam-card.inactive-24h {
    border-left: 5px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(26, 34, 52, 0.85) 100%);
}

.dash-cam-card.quota-warning {
    border-left: 5px solid #eab308;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(26, 34, 52, 0.85) 100%);
}

.dash-cam-card.cam-ignored {
    border-left: 5px solid #64748b;
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(26, 34, 52, 0.85) 100%);
    opacity: 0.78;
}

.dash-cam-card.cam-ignored:hover {
    opacity: 1;
    border-color: rgba(148, 163, 184, 0.5);
}

.dash-cam-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.dash-cam-title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-cam-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dash-cam-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.dash-cam-cred-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    color: #cbd5e1;
}

.dash-cam-id-badge {
    font-size: 15px;
    font-weight: 600;
    color: #94a3b8;
}

.dash-cam-body-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px 24px;
    font-size: 14px;
}

.dash-cam-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    flex-wrap: wrap;
}

.dash-cam-info-label {
    color: #94a3b8;
    font-weight: 500;
}

.dash-cam-toggles-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.5);
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-toggle-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

/* Image filmstrip */
.dash-cam-filmstrip-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(15, 23, 42, 0.4);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-cam-filmstrip-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 600;
}

.dash-cam-filmstrip-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.dash-cam-thumb-card {
    position: relative;
    width: 140px;
    height: 95px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #000;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.dash-cam-thumb-card:hover {
    transform: scale(1.04);
    border-color: var(--primary, #3b82f6);
}

.dash-cam-thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dash-cam-thumb-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    font-size: 10px;
    padding: 2px 4px;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-cam-no-images {
    padding: 12px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

.dash-cam-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-cam-action-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- KONTROLLANRUF LIVE MODAL --- */
@keyframes callPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.call-pulse-icon {
    display: inline-block;
    animation: callPulse 1.4s infinite ease-in-out;
}

.call-log-line {
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    word-break: break-word;
}

.call-log-time {
    color: #64748b;
    font-size: 11px;
    user-select: none;
}

.call-log-text {
    flex: 1;
}

.call-log-step {
    color: #38bdf8;
    font-weight: 500;
}

.call-log-success {
    color: #4ade80;
    font-weight: 600;
}

.call-log-error {
    color: #f87171;
    font-weight: 600;
}

/* --- ADMIN WEBKONSOLE / TERMINAL STYLING --- */
.console-pill-btn {
    border-radius: 20px !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    transition: all 0.2s ease;
}

.console-pill-btn:hover {
    background: rgba(59, 130, 246, 0.25) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    color: #93c5fd !important;
    transform: translateY(-1px);
}

.terminal-window-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    background: #080c14;
}

.terminal-header {
    background: #0f172a;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-window-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title-text {
    color: #94a3b8;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
    margin-left: 8px;
    font-weight: 500;
}

.terminal-status-ready {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #34d399;
    font-weight: 600;
}

.status-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: callPulse 1.8s infinite ease-in-out;
}

.terminal-output-body {
    background: #050811;
    padding: 16px;
    min-height: 380px;
    max-height: 520px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', Courier, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}

.term-welcome-msg {
    color: #38bdf8;
    margin-bottom: 12px;
    opacity: 0.9;
    user-select: none;
}

.term-cmd-entry {
    margin-top: 10px;
    margin-bottom: 4px;
    color: #a7f3d0;
    font-weight: 600;
}

.term-prompt-prefix {
    color: #38bdf8;
    user-select: none;
}

.term-cmd-text {
    color: #f8fafc;
}

.term-cmd-output {
    color: #cbd5e1;
    margin-bottom: 8px;
}

.term-cmd-error {
    color: #f87171;
    margin-bottom: 8px;
}

.term-cmd-meta {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 12px;
    user-select: none;
}

.terminal-input-bar {
    display: flex;
    align-items: center;
    background: #0f172a;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 10px;
}

.terminal-prompt-label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #38bdf8;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
}

.terminal-cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', Courier, monospace;
    font-size: 13.5px;
    padding: 6px 4px;
}

.terminal-cmd-input::placeholder {
    color: #475569;
    font-style: italic;
}

/* --- REAL-TIME INTERACTIVE XTERM TERMINAL STYLING --- */
.xterm-terminal-wrapper {
    position: relative;
    width: 100%;
    min-height: 440px;
    height: 480px;
    background: #060911;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    padding: 8px 12px;
}

.xterm-terminal-wrapper .xterm {
    height: 100%;
    padding: 4px;
}

.xterm-terminal-wrapper .xterm-viewport {
    background-color: #060911 !important;
}

#xterm-window-card.fullscreen-terminal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

#xterm-window-card.fullscreen-terminal .xterm-terminal-wrapper {
    height: calc(100vh - 44px) !important;
    min-height: calc(100vh - 44px) !important;
    border-radius: 0 !important;
}

/* --- PRANK STUDIO & 2-COLUMN RESPONSIVE LAYOUTS --- */
.grid-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 900px) {
    .grid-2col {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.prank-thumb-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.prank-thumb-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.8) !important;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35) !important;
}

#prank-images-filmstrip::-webkit-scrollbar {
    height: 6px;
}

#prank-images-filmstrip::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
}

#prank-images-filmstrip::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.4);
    border-radius: 3px;
}

#prank-images-filmstrip::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.8);
}


