/* VPUB Video Publishing Styles */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
}

.page {
    min-height: 100vh;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn:hover {
    background-color: #0056b3;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #007bff;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   LOGIN PAGE - Security Theme
   ============================================ */
.login-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f1923 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Security grid background */
.security-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.grid-line {
    position: absolute;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 150, 255, 0.1) 50%,
        transparent 100%);
}

.grid-line.horizontal {
    width: 100%;
    height: 1px;
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0, 150, 255, 0.1) 50%,
        transparent 100%);
}

.grid-line.h1 { top: 20%; animation: grid-pulse 4s ease-in-out infinite; }
.grid-line.h2 { top: 40%; animation: grid-pulse 4s ease-in-out infinite 1s; }
.grid-line.h3 { top: 60%; animation: grid-pulse 4s ease-in-out infinite 2s; }
.grid-line.h4 { top: 80%; animation: grid-pulse 4s ease-in-out infinite 3s; }
.grid-line.v1 { left: 20%; animation: grid-pulse 4s ease-in-out infinite 0.5s; }
.grid-line.v2 { left: 40%; animation: grid-pulse 4s ease-in-out infinite 1.5s; }
.grid-line.v3 { left: 60%; animation: grid-pulse 4s ease-in-out infinite 2.5s; }
.grid-line.v4 { left: 80%; animation: grid-pulse 4s ease-in-out infinite 3.5s; }

@keyframes grid-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Security nodes at intersections */
.security-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(0, 150, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.6), 0 0 20px rgba(0, 150, 255, 0.3);
    animation: node-pulse 3s ease-in-out infinite;
}

.security-node.n1 { top: 20%; left: 20%; animation-delay: 0s; }
.security-node.n2 { top: 20%; left: 60%; animation-delay: 0.5s; }
.security-node.n3 { top: 40%; left: 40%; animation-delay: 1s; }
.security-node.n4 { top: 60%; left: 80%; animation-delay: 1.5s; }
.security-node.n5 { top: 80%; left: 20%; animation-delay: 2s; }
.security-node.n6 { top: 80%; left: 60%; animation-delay: 2.5s; }

@keyframes node-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 1; }
}

/* Login card */
.login-card {
    position: relative;
    z-index: 10;
    background: rgba(15, 20, 30, 0.9);
    border: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 20px;
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(0, 150, 255, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

.lock-icon {
    text-align: center;
    margin-bottom: 20px;
    color: rgba(0, 150, 255, 0.8);
    filter: drop-shadow(0 0 15px rgba(0, 150, 255, 0.5));
    animation: lock-glow 2s ease-in-out infinite;
}

@keyframes lock-glow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(0, 150, 255, 0.5)); }
    50% { filter: drop-shadow(0 0 25px rgba(0, 150, 255, 0.8)); }
}

.login-card h1 {
    color: #ffffff;
    text-align: center;
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.login-card label svg {
    opacity: 0.7;
}

.login-card .form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-card .form-control:focus {
    outline: none;
    border-color: rgba(0, 150, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.2);
}

.login-card .alert-danger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ff6b7a;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.8) 0%, rgba(0, 100, 200, 0.8) 100%);
    border: 1px solid rgba(0, 150, 255, 0.5);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 150, 255, 0.3);
}

.btn-login:hover {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.9) 0%, rgba(0, 120, 220, 0.9) 100%);
    box-shadow: 0 6px 30px rgba(0, 150, 255, 0.5);
    transform: translateY(-2px);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: rgba(0, 150, 255, 0.8);
}

/* ============================================
   ADMIN LAYOUT - Dark Theme
   ============================================ */
.admin-page.dark-theme {
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 100%);
    color: #ffffff;
}

.admin-page.dark-theme .admin-nav {
    background: rgba(10, 10, 20, 0.95);
    border-bottom: 1px solid rgba(0, 150, 255, 0.2);
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-page.dark-theme .nav-brand a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #ffffff;
}

.admin-page.dark-theme .nav-logo {
    height: 40px;
    width: auto;
}

.admin-page.dark-theme .nav-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(0, 150, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.admin-page.dark-theme .nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-page.dark-theme .nav-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.admin-page.dark-theme .nav-links a:hover {
    background: rgba(0, 150, 255, 0.15);
    color: #ffffff;
}

.admin-page.dark-theme .nav-links a.nav-logout {
    color: rgba(255, 100, 100, 0.8);
}

.admin-page.dark-theme .nav-links a.nav-logout:hover {
    background: rgba(255, 100, 100, 0.15);
    color: #ff6b6b;
}

.admin-page.dark-theme .admin-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dark theme overrides for admin content */
.admin-page.dark-theme h1,
.admin-page.dark-theme h2,
.admin-page.dark-theme h3 {
    color: #ffffff;
}

.admin-page.dark-theme .dashboard-card {
    background: rgba(20, 25, 40, 0.8);
    border: 1px solid rgba(0, 150, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-page.dark-theme .dashboard-card h2 {
    color: rgba(0, 150, 255, 0.9);
}

.admin-page.dark-theme table {
    background: rgba(20, 25, 40, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.1);
}

.admin-page.dark-theme th {
    background: rgba(0, 150, 255, 0.1);
    color: rgba(0, 150, 255, 0.9);
    border-bottom: 1px solid rgba(0, 150, 255, 0.2);
}

.admin-page.dark-theme td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.admin-page.dark-theme tr:hover {
    background: rgba(0, 150, 255, 0.05);
}

.admin-page.dark-theme .form-control {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 150, 255, 0.2);
    color: #ffffff;
}

.admin-page.dark-theme .form-control:focus {
    border-color: rgba(0, 150, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.2);
    outline: none;
}

.admin-page.dark-theme .btn {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.7) 0%, rgba(0, 100, 200, 0.7) 100%);
    border: 1px solid rgba(0, 150, 255, 0.4);
    color: #ffffff;
}

.admin-page.dark-theme .btn:hover {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.8) 0%, rgba(0, 120, 220, 0.8) 100%);
    box-shadow: 0 4px 20px rgba(0, 150, 255, 0.3);
}

.admin-page.dark-theme .search-bar .form-control {
    background: rgba(0, 0, 0, 0.4);
}

.admin-page.dark-theme .pagination {
    color: rgba(255, 255, 255, 0.7);
}

.admin-page.dark-theme .pagination .btn {
    background: rgba(0, 150, 255, 0.2);
    border-color: rgba(0, 150, 255, 0.3);
}

.admin-page.dark-theme .pagination .btn:disabled {
    background: rgba(50, 50, 70, 0.5);
    border-color: rgba(100, 100, 120, 0.3);
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   PREVIEW THUMBNAILS
   ============================================ */
.preview-cell {
    text-align: center;
    vertical-align: middle;
}

.preview-container {
    position: relative;
    display: inline-block;
}

.preview-thumbnail {
    max-width: 50px;
    max-height: 40px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.preview-enlarged {
    display: none;
    position: fixed;
    max-width: 300px;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid rgba(0, 150, 255, 0.5);
    background: #0a0f1a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 150, 255, 0.3);
    z-index: 1000;
    pointer-events: none;
}

.preview-container:hover .preview-enlarged {
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================
   MODAL STYLES - Dark Theme
   ============================================ */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #1a1f35 0%, #0f1525 100%);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(0, 150, 255, 0.1);
    z-index: 1001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 150, 255, 0.2);
    background: rgba(0, 150, 255, 0.05);
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-header .close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-header .close-btn:hover {
    color: #ff6b6b;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-body .form-group {
    margin-bottom: 18px;
}

.modal-body label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-body .form-control {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-body .form-control:focus {
    outline: none;
    border-color: rgba(0, 150, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.2);
}

.modal-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.modal-body textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.modal-body input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: middle;
    accent-color: rgba(0, 150, 255, 0.8);
}

.modal-body label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.modal-body code {
    background: rgba(0, 150, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: rgba(0, 200, 255, 0.9);
}

.modal-body p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.modal-body .warning {
    color: #ff9f43;
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid rgba(0, 150, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

.modal-footer .btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .btn-secondary {
    background: rgba(100, 100, 120, 0.3);
    border: 1px solid rgba(100, 100, 120, 0.4);
    color: rgba(255, 255, 255, 0.7);
}

.modal-footer .btn-secondary:hover {
    background: rgba(100, 100, 120, 0.5);
    color: #ffffff;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.8) 0%, rgba(0, 100, 200, 0.8) 100%);
    border: 1px solid rgba(0, 150, 255, 0.5);
    color: #ffffff;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.9) 0%, rgba(0, 120, 220, 0.9) 100%);
    box-shadow: 0 4px 20px rgba(0, 150, 255, 0.4);
}

.modal-footer .btn-primary:disabled {
    background: rgba(50, 50, 70, 0.5);
    border-color: rgba(100, 100, 120, 0.3);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

.modal-footer .btn-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.8) 0%, rgba(180, 40, 55, 0.8) 100%);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ffffff;
}

.modal-footer .btn-danger:hover {
    background: linear-gradient(135deg, rgba(240, 60, 75, 0.9) 0%, rgba(200, 50, 65, 0.9) 100%);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
}

.modal-footer .btn-danger:disabled {
    background: rgba(100, 50, 55, 0.5);
    border-color: rgba(150, 70, 75, 0.3);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

.modal .error-message {
    padding: 12px 25px;
    background: rgba(220, 53, 69, 0.2);
    border-top: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
    font-size: 0.9rem;
}

/* Site management toolbar */
.site-management .toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.site-management .toolbar-left {
    display: flex;
    gap: 12px;
}

.site-management .toolbar-right {
    display: flex;
    align-items: center;
}

.site-management .search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.site-management .search-box input {
    width: 250px;
    padding: 8px 32px 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
}

.site-management .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.site-management .search-box input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.site-management .search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.site-management .search-clear:hover {
    color: rgba(255, 255, 255, 0.8);
}

.admin-page.dark-theme .btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.admin-page.dark-theme .btn-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.7) 0%, rgba(180, 40, 55, 0.7) 100%);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ffffff;
}

.admin-page.dark-theme .btn-danger:hover {
    background: linear-gradient(135deg, rgba(240, 60, 75, 0.8) 0%, rgba(200, 50, 65, 0.8) 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.admin-page.dark-theme .text-center {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 30px;
}

/* Upload button styling */
.input-with-upload {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input-with-upload .form-control {
    flex: 1;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.6) 0%, rgba(0, 100, 200, 0.6) 100%);
    border: 1px solid rgba(0, 150, 255, 0.4);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.upload-btn:hover {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.7) 0%, rgba(0, 120, 220, 0.7) 100%);
    box-shadow: 0 4px 15px rgba(0, 150, 255, 0.3);
}

.upload-btn input[type="file"] {
    display: none;
}

.upload-btn svg {
    flex-shrink: 0;
}

.field-error {
    color: #ff6b7a;
    font-size: 0.85rem;
    margin-top: 6px;
}

.preview-link {
    margin-top: 6px;
}

.preview-link a {
    color: rgba(0, 150, 255, 0.8);
    font-size: 0.85rem;
    text-decoration: none;
}

.preview-link a:hover {
    color: rgba(0, 200, 255, 1);
    text-decoration: underline;
}

/* Brand image preview in edit modal */
.brand-image-preview {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 8px;
    text-align: center;
}

.brand-image-preview img {
    max-width: 200px;
    max-height: 150px;
    object-fit: contain;
    border-radius: 4px;
}

/* Form row layout for inline fields */
.form-group-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.form-group-row .form-group {
    margin-bottom: 0;
}

.form-group-row .checkbox-group {
    flex-shrink: 0;
    padding-top: 28px;
}

.form-group-row .flex-grow {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

/* Required field indicator */
.required {
    color: #ff6b7a;
    margin-left: 3px;
}

/* Input error state */
.input-error {
    border-color: rgba(255, 100, 100, 0.6) !important;
    box-shadow: 0 0 10px rgba(255, 100, 100, 0.2) !important;
}

.input-error:focus {
    border-color: rgba(255, 100, 100, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 100, 100, 0.3) !important;
}

/* Dashboard */
.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dashboard-card h2 {
    margin-top: 0;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-header h1 {
    margin: 0;
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.last-updated {
    color: #9ca3af;
    font-size: 0.875rem;
}

.btn-refresh {
    background: rgba(59, 130, 246, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.btn-refresh:hover:not(:disabled) {
    background: rgba(59, 130, 246, 1);
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dashboard Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card.pending {
    border-color: rgba(251, 191, 36, 0.5);
}

.stat-card.processing {
    border-color: rgba(59, 130, 246, 0.5);
}

.stat-card.failed {
    border-color: rgba(239, 68, 68, 0.5);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.stat-card.pending .stat-value {
    color: #fbbf24;
}

.stat-card.processing .stat-value {
    color: #3b82f6;
}

.stat-card.failed .stat-value {
    color: #ef4444;
}

.stat-label {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 8px;
}

.dashboard-section {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.dashboard-section h2 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #e5e7eb;
}

.chart-container {
    height: 250px;
    position: relative;
}

.disk-usage {
    padding: 10px 0;
}

.disk-usage-bar {
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.disk-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 150, 255, 0.8), rgba(59, 130, 246, 0.8));
    border-radius: 12px;
    transition: width 0.5s ease;
}

.disk-usage-text {
    text-align: center;
    margin-top: 10px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

.no-data {
    color: #6b7280;
    font-style: italic;
    margin: 0;
}

.unused-videos-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.unused-videos-table-container {
    max-height: 300px;
    overflow-y: auto;
}

.unused-videos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.unused-videos-table th,
.unused-videos-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.unused-videos-table th {
    background: rgba(0, 0, 0, 0.2);
    color: #9ca3af;
    font-weight: 500;
    position: sticky;
    top: 0;
}

.unused-videos-table td {
    color: #e5e7eb;
}

.unused-videos-table tr:hover td {
    background: rgba(0, 150, 255, 0.1);
}

.unused-videos-table a {
    color: #60a5fa;
    text-decoration: none;
}

.unused-videos-table a:hover {
    text-decoration: underline;
}

.unused-videos-table .checkbox-col {
    width: 40px;
    text-align: center;
}

.purge-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.btn-danger:disabled {
    background: #6b7280;
    cursor: not-allowed;
}

.btn-danger-outline {
    background: transparent;
    color: #f87171;
    border: 1px solid #f87171;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-danger-outline:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.1);
}

.btn-danger-outline:disabled {
    color: #6b7280;
    border-color: #6b7280;
    cursor: not-allowed;
}

.purge-message {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.purge-message.success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.purge-message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-dialog {
    background: #1e293b;
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 12px;
    padding: 24px;
    max-width: 450px;
    width: 90%;
}

.modal-dialog h3 {
    margin: 0 0 15px 0;
    color: #f87171;
}

.modal-dialog p {
    color: #9ca3af;
    margin: 0 0 10px 0;
}

.modal-warning {
    color: #fbbf24 !important;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Failed Videos Modal */
.failed-videos-modal {
    max-width: none;
    width: 95vw;
    margin: 20px;
}

.failed-videos-modal h3 {
    color: #f87171;
    margin-bottom: 20px;
}

.failed-videos-table-container {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    margin-bottom: 15px;
}

.failed-videos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.failed-videos-table th,
.failed-videos-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.failed-videos-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.failed-videos-table th {
    background: #1e293b;
    color: #e2e8f0;
    font-weight: 600;
    border-bottom: 2px solid #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.failed-videos-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.failed-videos-table td {
    color: #e5e7eb;
}

.failed-videos-table .guid-cell {
    font-family: monospace;
    font-size: 0.85rem;
    color: #9ca3af;
}

.failed-videos-table .error-cell {
    color: #f87171;
    word-break: break-word;
    white-space: normal;
}

.failed-videos-table .actions-cell {
    white-space: nowrap;
}

.failed-videos-table a {
    color: #60a5fa;
    text-decoration: none;
}

.failed-videos-table a:hover {
    text-decoration: underline;
}

.btn-small {
    padding: 4px 10px;
    font-size: 0.85rem;
    margin-right: 5px;
}

a.stat-card {
    text-decoration: none;
    color: inherit;
}

.stat-card.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background: #f5f5f5;
}

tr.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

tr.clickable-row:hover {
    background: #e3f2fd;
}

tr.failed-row {
    background: rgba(220, 53, 69, 0.2) !important;
}

tr.failed-row:hover {
    background: rgba(220, 53, 69, 0.3) !important;
}

/* Search */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar .form-control {
    flex: 1;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* ============================================
   WATCH PAGE
   ============================================ */
.watch-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 40px 20px;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.watch-container {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
}

.watch-container .loading {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.watch-container .video-title {
    margin: 0 0 15px 0;
    font-size: 1.75rem;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
}

/* Inappropriate content warning */
.watch-container .inappropriate-warning {
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.95rem;
}

.watch-container .inappropriate-warning strong {
    color: #ef4444;
    margin-right: 8px;
}

.watch-container .inappropriate-warning span {
    margin-left: 12px;
    color: #f87171;
}

/* Main layout - brand sidebar on left, video on right */
.watch-container .video-wrapper {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: stretch;
    flex-wrap: wrap;
}

/* Brand sidebar - positioned to the left of video */
.watch-container .brand-sidebar {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    order: -1; /* Ensure it comes first */
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.watch-container .brand-sidebar:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
}

.watch-container .brand-text {
    display: block;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
}

.watch-container .brand-sidebar:hover .brand-text {
    color: #00ff00;
}

.watch-container .brand-image {
    max-width: 180px;
    height: auto;
    border-radius: 4px;
}

/* Video main content area */
.watch-container .video-main {
    flex: 1;
    min-width: 0;
}

.watch-container .video-player {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.watch-container .video-element {
    width: 100%;
    display: block;
}

/* Play button overlay */
.watch-container .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.2s ease;
}

.watch-container .play-overlay:hover {
    background: rgba(0, 0, 0, 0.4);
}

.watch-container .play-overlay .play-icon {
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease, color 0.2s ease;
}

.watch-container .play-overlay:hover .play-icon {
    transform: scale(1.1);
    color: #fff;
}

/* Video row - video player and metadata side by side */
.watch-container .video-row {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.watch-container .video-row .video-player {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.watch-container .video-row .video-element {
    flex: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Video metadata sidebar - to the right of video */
.watch-container .video-meta {
    flex-shrink: 0;
    width: 220px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: rgba(255, 255, 255, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow-y: auto;
}

.watch-container .meta-heading {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(0, 255, 0, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.watch-container .meta-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.watch-container .meta-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.watch-container .meta-value {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 500;
}

.watch-container .video-info {
    padding: 15px 0;
}

.watch-container .video-info .player-info,
.watch-container .video-info .site-info {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.watch-container .video-info .stats {
    margin: 15px 0 0 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.watch-container .video-info .stats span {
    margin-right: 20px;
}

/* Social share icons */
.watch-container .social-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.watch-container .share-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.watch-container .share-icons {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.watch-container .share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.watch-container .share-icon svg {
    width: 22px;
    height: 22px;
}

.watch-container .share-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.watch-container .share-icon.download {
    background: #28a745;
    color: white;
}

.watch-container .share-icon.download:disabled {
    opacity: 0.7;
    cursor: wait;
}

.watch-container .share-icon .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.watch-container .share-icon.facebook {
    background: #1877f2;
    color: white;
}

.watch-container .share-icon.twitter {
    background: #000000;
    color: white;
}

.watch-container .share-icon.threads {
    background: #000000;
    color: white;
}

/* Fallback branding for legacy videos */
.watch-container .brand-fallback {
    text-align: center;
    padding: 20px;
}

.watch-container .brand-fallback .brand-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin: 0;
}

/* Not found state */
.watch-container .not-found {
    text-align: center;
    padding: 60px 20px;
}

.watch-container .not-found h2 {
    color: #ffffff;
    margin: 0 0 10px 0;
}

.watch-container .not-found p {
    color: rgba(255, 255, 255, 0.7);
}

/* Watch page footer */
.watch-footer {
    text-align: center;
    padding: 25px 20px;
    margin: auto -20px -40px -20px;
    background: rgba(0, 0, 0, 0.8);
}

.watch-footer .footer-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.watch-footer .footer-link:hover {
    opacity: 1;
}

.watch-footer .footer-logo {
    height: 35px;
    width: auto;
}

.watch-footer .footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Responsive - stack on smaller screens */
@media (max-width: 768px) {
    .watch-container .video-wrapper {
        flex-direction: column;
    }

    .watch-container .brand-sidebar {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        padding: 15px 20px;
        order: 0;
    }

    .watch-container .brand-text {
        margin-bottom: 0;
    }

    .watch-container .brand-image {
        max-width: 120px;
    }

    .watch-container .video-info h1 {
        font-size: 1.25rem;
    }

    .watch-container .share-buttons {
        flex-wrap: wrap;
    }

    .watch-container .video-row {
        flex-direction: column;
    }

    .watch-container .video-meta {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px;
    }

    .watch-container .meta-heading {
        width: 100%;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .watch-container .meta-item {
        flex: 1;
        min-width: 100px;
        margin-bottom: 0;
    }
}

/* Landing Page - Full screen layout */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    background: #1a1a2e;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 100;
}

.hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 255, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 200, 0, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

/* Laser beam container */
.laser-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Individual laser beams */
.laser-beam {
    position: absolute;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 255, 0, 0.1) 10%,
        rgba(0, 255, 0, 0.8) 50%,
        rgba(0, 255, 0, 0.1) 90%,
        transparent 100%);
    box-shadow:
        0 0 10px rgba(0, 255, 0, 0.8),
        0 0 20px rgba(0, 255, 0, 0.6),
        0 0 40px rgba(0, 255, 0, 0.4),
        0 0 80px rgba(0, 255, 0, 0.2);
    transform-origin: center;
}

/* Horizontal beams */
.laser-beam.h1 {
    width: 150%;
    height: 2px;
    top: 15%;
    left: -25%;
    transform: rotate(-8deg);
    animation: laser-pulse 4s ease-in-out infinite;
}

.laser-beam.h2 {
    width: 140%;
    height: 2px;
    top: 35%;
    left: -20%;
    transform: rotate(5deg);
    animation: laser-pulse 4s ease-in-out infinite 0.5s;
}

.laser-beam.h3 {
    width: 160%;
    height: 2px;
    top: 55%;
    left: -30%;
    transform: rotate(-3deg);
    animation: laser-pulse 4s ease-in-out infinite 1s;
}

.laser-beam.h4 {
    width: 130%;
    height: 2px;
    top: 75%;
    left: -15%;
    transform: rotate(7deg);
    animation: laser-pulse 4s ease-in-out infinite 1.5s;
}

.laser-beam.h5 {
    width: 145%;
    height: 2px;
    top: 90%;
    left: -22%;
    transform: rotate(-5deg);
    animation: laser-pulse 4s ease-in-out infinite 2s;
}

/* Diagonal beams */
.laser-beam.d1 {
    width: 180%;
    height: 2px;
    top: 50%;
    left: -40%;
    transform: rotate(35deg);
    animation: laser-pulse 5s ease-in-out infinite 0.3s;
}

.laser-beam.d2 {
    width: 180%;
    height: 2px;
    top: 50%;
    left: -40%;
    transform: rotate(-35deg);
    animation: laser-pulse 5s ease-in-out infinite 0.8s;
}

.laser-beam.d3 {
    width: 200%;
    height: 2px;
    top: 30%;
    left: -50%;
    transform: rotate(55deg);
    animation: laser-pulse 5s ease-in-out infinite 1.3s;
}

.laser-beam.d4 {
    width: 200%;
    height: 2px;
    top: 70%;
    left: -50%;
    transform: rotate(-55deg);
    animation: laser-pulse 5s ease-in-out infinite 1.8s;
}

.laser-beam.d5 {
    width: 170%;
    height: 2px;
    top: 20%;
    left: -35%;
    transform: rotate(25deg);
    animation: laser-pulse 4.5s ease-in-out infinite 2.3s;
}

.laser-beam.d6 {
    width: 170%;
    height: 2px;
    top: 80%;
    left: -35%;
    transform: rotate(-25deg);
    animation: laser-pulse 4.5s ease-in-out infinite 2.8s;
}

/* Vertical accent beams */
.laser-beam.v1 {
    width: 200%;
    height: 1px;
    top: 40%;
    left: -50%;
    transform: rotate(85deg);
    opacity: 0.6;
    animation: laser-pulse 6s ease-in-out infinite 0.2s;
}

.laser-beam.v2 {
    width: 200%;
    height: 1px;
    top: 60%;
    left: -50%;
    transform: rotate(-80deg);
    opacity: 0.6;
    animation: laser-pulse 6s ease-in-out infinite 1.2s;
}

/* Laser pulse animation */
@keyframes laser-pulse {
    0%, 100% {
        opacity: 0.4;
        filter: brightness(1);
    }
    50% {
        opacity: 0.9;
        filter: brightness(1.3);
    }
}

/* Scanning beam effect */
.laser-scan {
    position: absolute;
    width: 3px;
    height: 120%;
    top: -10%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0, 255, 0, 0.3) 20%,
        rgba(0, 255, 0, 1) 50%,
        rgba(0, 255, 0, 0.3) 80%,
        transparent 100%);
    box-shadow:
        0 0 15px rgba(0, 255, 0, 1),
        0 0 30px rgba(0, 255, 0, 0.8),
        0 0 60px rgba(0, 255, 0, 0.5);
    animation: laser-scan 8s linear infinite;
    opacity: 0.7;
}

.laser-scan.s2 {
    animation: laser-scan 10s linear infinite 3s;
    opacity: 0.5;
    width: 2px;
}

@keyframes laser-scan {
    0% {
        left: -5%;
        transform: rotate(5deg);
    }
    50% {
        transform: rotate(-5deg);
    }
    100% {
        left: 105%;
        transform: rotate(5deg);
    }
}

/* Intersection glow points */
.laser-glow {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(0, 255, 0, 1) 0%, rgba(0, 255, 0, 0.5) 40%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8), 0 0 40px rgba(0, 255, 0, 0.5);
    animation: glow-pulse 2s ease-in-out infinite;
}

.laser-glow:nth-child(1) { top: 15%; left: 20%; animation-delay: 0s; }
.laser-glow:nth-child(2) { top: 35%; left: 60%; animation-delay: 0.3s; }
.laser-glow:nth-child(3) { top: 55%; left: 30%; animation-delay: 0.6s; }
.laser-glow:nth-child(4) { top: 75%; left: 75%; animation-delay: 0.9s; }
.laser-glow:nth-child(5) { top: 25%; left: 85%; animation-delay: 1.2s; }
.laser-glow:nth-child(6) { top: 65%; left: 15%; animation-delay: 1.5s; }
.laser-glow:nth-child(7) { top: 45%; left: 45%; animation-delay: 1.8s; }
.laser-glow:nth-child(8) { top: 85%; left: 50%; animation-delay: 2.1s; }

@keyframes glow-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://funovation.com/wp-content/uploads/2023/11/FUN-Home-FEAT.png') center center no-repeat;
    background-size: cover;
    opacity: 0.15;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 50px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 255, 0, 0.3);
    border-radius: 20px;
    box-shadow:
        0 0 30px rgba(0, 255, 0, 0.2),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
    margin: 20px;
    max-width: 600px;
}

/* Remove any Blazor edit boundaries or focus outlines */
.hero-content *,
.hero-section *,
.landing-page * {
    outline: none !important;
}

/* Override Blazor edit boundary styling */
[b-*],
blazor-error-boundary,
.blazor-error-boundary {
    border: none !important;
    outline: none !important;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hero-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.logo-tagline {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 3rem;
    font-weight: 700;
    color: #00ff00;
    text-shadow:
        0 0 10px rgba(0, 255, 0, 0.8),
        0 0 20px rgba(0, 255, 0, 0.6),
        0 0 40px rgba(0, 255, 0, 0.4);
    letter-spacing: 2px;
}

.logo-tagline .video-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.8));
}

.hero-title,
.hero-title:focus,
.hero-title:focus-visible,
h1:focus,
h1:focus-visible {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    border: none !important;
    outline: none !important;
    outline-width: 0 !important;
    box-shadow: none;
    background: transparent;
    padding: 20px 40px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 300;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: linear-gradient(145deg, #16213e 0%, #1a1a2e 100%);
    border-radius: 16px;
    padding: 35px 30px;
    text-align: center;
    border: 1px solid rgba(0, 255, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
}

.info-icon {
    color: #00ff00;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.5));
}

.info-icon svg {
    width: 48px;
    height: 48px;
}

.info-card h2 {
    color: #ffffff;
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.info-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 255, 0, 0.05) 100%);
    text-align: center;
    padding: 60px 40px;
    border-top: 1px solid rgba(0, 255, 0, 0.1);
}

.cta-section h2 {
    color: #ffffff;
    font-size: 2rem;
    margin: 0 0 20px 0;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.7;
    font-size: 1.1rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #00cc00 0%, #009900 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.4);
    border: 1px solid rgba(0, 255, 0, 0.5);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 0, 0.6);
    background: linear-gradient(135deg, #00dd00 0%, #00aa00 100%);
}

/* Landing Footer */
.landing-footer {
    background: #0f0f1a;
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-footer p {
    color: rgba(255, 255, 255, 0.5);
    margin: 10px 0;
    font-size: 0.9rem;
}

.landing-footer a {
    color: #00cc00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.landing-footer a:hover {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-row {
        flex-direction: column;
        gap: 10px;
    }

    .logo-tagline {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2rem;
        padding: 15px 20px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-logo {
        max-width: 200px;
    }

    .hero-content {
        padding: 40px 25px;
        margin: 10px;
    }

    .info-section {
        padding: 40px 20px;
        gap: 20px;
    }

    .cta-section {
        padding: 40px 20px;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }
}

/* Email Template Editor Styles */
.template-editor-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    /* Break out of parent container to use full width */
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0;
    box-sizing: border-box;
}

.template-editor-page h1 {
    margin: 0;
    font-size: 1.5rem;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
}

.dirty-indicator {
    color: #ffc107;
    font-size: 0.85rem;
    padding: 4px 10px;
    background: rgba(255, 193, 7, 0.15);
    border-radius: 4px;
}

.editor-meta {
    display: flex;
    gap: 20px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-meta .form-group {
    flex: 1;
    margin-bottom: 0;
}

.editor-meta label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.editor-meta input {
    padding: 8px 12px;
}

.template-editor {
    display: flex;
    flex: 1;
    gap: 10px;
    overflow: hidden;
    width: 100%;
}

.template-editor .code-pane,
.template-editor .preview-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.template-editor .code-pane {
    border-right: none;
}

.template-editor .pane-header {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.template-editor .pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-editor .pane-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.template-editor .pane-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.template-editor .pane-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.template-editor .tab-size-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.template-editor .tab-size-toggle .toggle-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-right: 4px;
}

.template-editor .tab-size-toggle .tab-btn {
    padding: 2px 8px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.15s ease;
}

.template-editor .tab-size-toggle .tab-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.template-editor .tab-size-toggle .tab-btn.active {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    color: #a78bfa;
}

.template-editor .code-textarea {
    flex: 1;
    width: 100%;
    padding: 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #1e1e2e;
    color: #e0e0e0;
    border: none;
    resize: none;
    outline: none;
    white-space: pre;
    overflow: auto;
}

.template-editor .code-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.template-editor .code-editor-container {
    flex: 1;
    overflow: hidden;
}

.template-editor .code-editor-container .CodeMirror {
    height: 100%;
    font-size: 13px;
}

.template-editor .preview-content {
    flex: 1;
    padding: 20px;
    background: #ffffff;
    color: #333333;
    overflow: auto;
}

/* Token legend */
.token-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.token-legend .legend-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-right: 5px;
}

.token-legend .token-sample {
    padding: 3px 8px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #a78bfa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.token-legend .token-sample:hover {
    background: rgba(139, 92, 246, 0.35);
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-1px);
}

/* Token highlighting in preview */
.preview-content .email-token {
    display: inline;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    font-weight: 500;
    cursor: help;
}

.preview-content .email-token.token-known {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.preview-content .email-token.token-unknown {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

/* Template list styles */
.template-management {
    padding: 20px;
}

.template-grid {
    margin-top: 20px;
}

.btn-danger {
    background: rgba(220, 53, 69, 0.8);
    border-color: rgba(220, 53, 69, 0.8);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(220, 53, 69, 1);
}

.btn-danger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive for template editor */
@media (max-width: 992px) {
    .template-editor {
        flex-direction: column;
    }

    .template-editor .code-pane {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex: none;
        height: 50%;
    }

    .template-editor .preview-pane {
        flex: none;
        height: 50%;
    }

    .editor-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================
   Tools Page Styles
   ======================================== */

.tools-page {
    max-width: 1200px;
    margin: 0 auto;
}

.tools-page .tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(0, 150, 255, 0.2);
    padding-bottom: 15px;
}

.tools-page .tab {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.tools-page .tab:hover {
    background: rgba(0, 150, 255, 0.1);
    color: #ffffff;
}

.tools-page .tab.active {
    background: rgba(0, 150, 255, 0.2);
    border-color: rgba(0, 150, 255, 0.5);
    color: #ffffff;
}

.tools-page .tab-content {
    padding: 25px;
    background: rgba(20, 25, 40, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.1);
    border-radius: 8px;
}

.tools-page .tool-section h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #ffffff;
}

.tools-page .tool-description {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
}

/* Mode Toggle */
.tools-page .mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tools-page .mode-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tools-page .mode-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.tools-page .mode-btn.active {
    background: rgba(0, 150, 255, 0.2);
    border-color: rgba(0, 150, 255, 0.4);
    color: #ffffff;
}

/* Form Sections */
.tools-page .form-section {
    margin-bottom: 20px;
}

.tools-page .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.tools-page .form-group {
    margin-bottom: 15px;
}

.tools-page .form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.tools-page .form-group input,
.tools-page .form-group select,
.tools-page .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.95rem;
}

.tools-page .form-group input:focus,
.tools-page .form-group select:focus,
.tools-page .form-group textarea:focus {
    outline: none;
    border-color: rgba(0, 150, 255, 0.5);
}

.tools-page .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.tools-page .checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Search Form */
.tools-page .search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    align-items: end;
}

/* Results Table */
.tools-page .results-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.tools-page .results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tools-page .results-table th,
.tools-page .results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tools-page .results-table th {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.tools-page .results-table td {
    color: rgba(255, 255, 255, 0.7);
}

.tools-page .results-table a {
    color: #60a5fa;
    text-decoration: none;
}

.tools-page .results-table a:hover {
    text-decoration: underline;
}

/* Status Badges */
.tools-page .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tools-page .status-badge.ok {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.tools-page .status-badge.inappropriate {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Buttons */
.tools-page .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.tools-page .btn-primary {
    background: linear-gradient(135deg, #0096ff, #0066cc);
    color: #ffffff;
}

.tools-page .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #00a6ff, #0076dc);
}

.tools-page .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.tools-page .btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.tools-page .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}

.tools-page .btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.tools-page .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.tools-page .btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.tools-page .btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.tools-page .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Messages */
.tools-page .result-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 0.95rem;
}

.tools-page .result-message.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.tools-page .result-message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* Preview Section */
.tools-page .preview-section {
    margin: 20px 0;
}

.tools-page .preview-section h3 {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.tools-page .preview-frame {
    background: #ffffff;
    border-radius: 6px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    color: #333333;
}

/* Modal */
.tools-page .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.tools-page .modal {
    background: #1a1f35;
    border: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.tools-page .modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #ffffff;
}

.tools-page .modal p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.7);
}

.tools-page .modal p strong {
    color: rgba(255, 255, 255, 0.9);
}

.tools-page .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Progress Bar */
.tools-page .progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    height: 8px;
    margin: 15px 0;
    overflow: hidden;
}

.tools-page .progress-fill {
    background: linear-gradient(90deg, #0096ff, #00d4aa);
    height: 100%;
    transition: width 0.3s ease;
}

/* Warning message */
.tools-page .result-message.warning {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

/* URL and error cells in tables */
.tools-page .url-cell {
    max-width: 250px;
    word-break: break-all;
}

.tools-page .error-cell {
    color: #f87171;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .tools-page .tabs {
        flex-wrap: wrap;
    }

    .tools-page .tab {
        flex: 1 1 auto;
        text-align: center;
    }

    .tools-page .search-form {
        grid-template-columns: 1fr;
    }

    .tools-page .modal {
        width: 95%;
        padding: 20px;
    }
}

/* ============================================
   INFO ICON (uses native title attribute for tooltip)
   ============================================ */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #e5e7eb;
    border-radius: 50%;
    cursor: help;
    vertical-align: middle;
}

.info-icon:hover {
    color: #374151;
    background: #d1d5db;
}

/* Video Stats Cards */
.video-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.video-stats-cards .stat-card {
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-stats-cards .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-stats-cards .stat-card.selected {
    border-width: 2px;
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.3);
}

.video-stats-cards .stat-card .stat-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.video-stats-cards .stat-card .stat-count {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.video-stats-cards .stat-card .stat-size {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

.video-stats-cards .stat-card .stat-description {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Category-specific colors */
.video-stats-cards .stat-card.stat-deletable {
    border-color: rgba(239, 68, 68, 0.5);
}
.video-stats-cards .stat-card.stat-deletable .stat-count {
    color: #ef4444;
}
.video-stats-cards .stat-card.stat-deletable.selected {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.video-stats-cards .stat-card.stat-warning {
    border-color: rgba(251, 191, 36, 0.5);
}
.video-stats-cards .stat-card.stat-warning .stat-count {
    color: #fbbf24;
}
.video-stats-cards .stat-card.stat-warning.selected {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.video-stats-cards .stat-card.stat-info {
    border-color: rgba(59, 130, 246, 0.5);
}
.video-stats-cards .stat-card.stat-info .stat-count {
    color: #3b82f6;
}
.video-stats-cards .stat-card.stat-info.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.video-stats-cards .stat-card.stat-success {
    border-color: rgba(34, 197, 94, 0.5);
}
.video-stats-cards .stat-card.stat-success .stat-count {
    color: #22c55e;
}
.video-stats-cards .stat-card.stat-success.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.video-stats-cards .stat-card.stat-viral {
    border-color: rgba(168, 85, 247, 0.5);
}
.video-stats-cards .stat-card.stat-viral .stat-count {
    color: #a855f7;
}
.video-stats-cards .stat-card.stat-viral.selected {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

/* Category video list */
.category-video-list {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.category-video-list h3 {
    margin: 0 0 15px 0;
    color: #e5e7eb;
    font-size: 1.1rem;
}
