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

:root {
    --bg-main: #0a0a0f;
    --bg-card: rgba(18, 18, 26, 0.75);
    --bg-card-border: rgba(255, 255, 255, 0.07);
    --accent-purple: #6366f1;
    --accent-purple-glow: rgba(99, 102, 241, 0.15);
    --accent-teal: #0ea5e9;
    --accent-teal-glow: rgba(14, 165, 233, 0.15);
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-text: #e2e8f0;
    --color-text-muted: #64748b;
    --sidebar-width: 260px;
    --border-radius: 12px;
    --font-headers: 'Orbitron', sans-serif;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-main);
    color: var(--color-text);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.07) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(14, 165, 233, 0.07) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-teal);
}

/* Glassmorphism utility */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}
.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headers);
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(13, 13, 26, 0.9);
    border-right: 1px solid var(--bg-card-border);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    font-family: var(--font-headers);
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 10px var(--accent-purple-glow);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 10px 5px;
}
.sidebar-logo i {
    color: var(--accent-purple);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 25px;
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--accent-purple);
    object-fit: cover;
}

.sidebar-user-info {
    overflow: hidden;
}
.sidebar-username {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.sidebar-role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    font-family: var(--font-headers);
}

.role-superadmin { background-color: var(--color-danger); color: #fff; box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
.role-admin { background-color: var(--color-warning); color: #000; }
.role-user { background-color: var(--accent-teal); color: #000; }

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.sidebar-item a:hover, .sidebar-item.active a {
    color: #fff;
    background: rgba(124, 58, 237, 0.15);
    border-left: 3px solid var(--accent-purple);
}

.sidebar-item a i {
    font-size: 20px;
    transition: transform 0.2s ease;
}
.sidebar-item a:hover i {
    transform: scale(1.1);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Main Content Wrapper */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 40px;
    min-height: 100vh;
}

/* Grid & Cards */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Inputs and Forms */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
}
.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 15px;
    transition: all 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-purple);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}
.btn-primary {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}
.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-text);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}
.btn-danger {
    background: var(--color-danger);
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}
.btn-success {
    background: var(--color-success);
    color: #fff;
}
.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    text-align: left;
}
th {
    padding: 14px 16px;
    border-bottom: 2px solid rgba(124, 58, 237, 0.2);
    color: var(--color-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    vertical-align: middle;
}
tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Alert notifications */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: #a7f3d0;
}
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--color-danger);
    color: #fca5a5;
}
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--color-warning);
    color: #fde68a;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-teal { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Landing Page / Login Style */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-card {
    max-width: 480px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.8s ease;
}
.login-title {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(to right, #fff, var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.login-subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}
.twitch-btn {
    width: 100%;
    background: #9146FF;
    color: white;
    font-size: 16px;
    padding: 14px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.4);
}
.twitch-btn:hover {
    background: #772ce8;
    box-shadow: 0 4px 20px rgba(145, 70, 255, 0.7);
    transform: translateY(-2px);
}

/* Feature Row in Login */
.feature-list {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
    display: flex;
    justify-content: space-around;
}
.feature-item {
    font-size: 11px;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
}
.feature-item i {
    font-size: 24px;
    color: var(--accent-teal);
}

/* Forbidden Page */
.forbidden-container {
    max-width: 600px;
    text-align: center;
}
.forbidden-icon {
    font-size: 72px;
    color: var(--color-danger);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    margin-bottom: 20px;
}

/* Widget Cards */
.widget-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.widget-stat-info h3 {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
}
.widget-stat-info p {
    font-size: 28px;
    font-weight: 800;
    font-family: var(--font-headers);
    color: #fff;
    margin-top: 5px;
}
.widget-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    background: rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.2);
}
.widget-stat-icon i {
    font-size: 24px;
    color: var(--accent-purple);
}

/* License Timer Progress */
.timer-container {
    margin-top: 15px;
}
.timer-countdown {
    font-family: var(--font-mono);
    font-size: 20px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--accent-purple), var(--accent-teal));
    width: 100%;
    transition: width 1s linear;
}

/* Analyze Form Area */
.search-container {
    max-width: 700px;
    margin: 40px auto;
    position: relative;
}
.search-box-wrapper {
    position: relative;
    display: flex;
}
.search-icon-btn {
    position: absolute;
    right: 6px;
    top: 5px;
    height: 42px;
    background: var(--accent-purple);
    border: none;
    border-radius: 6px;
    color: white;
    padding: 0 25px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-icon-btn:hover {
    background: #6d28d9;
}
.search-input {
    height: 52px;
    font-size: 16px;
    padding-left: 20px;
    padding-right: 140px;
    border-radius: 8px;
}

/* Loader Screen for Polling */
.loader-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 13, 26, 0.95);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}
.loader-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(124, 58, 237, 0.1);
    border-top: 4px solid var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
    box-shadow: 0 0 15px var(--accent-purple-glow);
}
.loader-status-list {
    margin-top: 20px;
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.loader-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 14px;
}
.loader-status-item.active {
    color: #fff;
    font-weight: 600;
}
.loader-status-item.completed {
    color: var(--color-success);
}
.loader-status-item.completed i {
    color: var(--color-success);
}
.loader-status-item i {
    font-size: 18px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Suggestions tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
.tag-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}
.tag-item:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--accent-purple);
    color: white;
}

/* Report Panel specifics */
.verdict-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}
.verdict-gauge {
    position: relative;
    width: 150px;
    height: 150px;
}
.verdict-details {
    flex-grow: 1;
}
.verdict-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
}
.verdict-desc {
    color: var(--color-text-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 992px) {
    .grid-3, .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 10px 5px;
    }
    .sidebar-logo span, .sidebar-username, .sidebar-role-badge, .sidebar-item a span, .sidebar-user-info {
        display: none;
    }
    .sidebar-logo {
        justify-content: center;
        margin-bottom: 20px;
    }
    .sidebar-user {
        justify-content: center;
        padding: 10px 0;
    }
    .sidebar-item a {
        justify-content: center;
        padding: 12px;
    }
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
    .grid-3, .grid-4, .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Autocomplete Dropdown */
.autocomplete-suggestions {
    background: rgba(13, 13, 26, 0.95) !important;
    border: 1px solid var(--bg-card-border) !important;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.autocomplete-suggestion:hover {
    background: rgba(124, 58, 237, 0.2) !important;
    color: #fff;
}

/* Modal Popup */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1100;
    align-items: center;
    justify-content: center;
}
.modal-content {
    max-width: 450px;
    width: 90%;
    animation: fadeIn 0.3s ease;
}
