/* ============================================================
   Gojo Bot — Centralized Web Styles
   OAuth Verification Page + Private Dashboard
   ============================================================ */

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

/* ── Root Variables ─────────────────────────────────────── */
:root {
    --bg-main: #0b0c10;
    --bg-dashboard: #07080c;
    --card-bg: rgba(22, 24, 32, 0.75);
    --dashboard-card-bg: #0f1117;
    --sidebar-bg: #0a0b0f;

    --text-main: #ffffff;
    --text-muted: #a0a5b1;
    --dashboard-text-muted: #8e9297;

    --accent: #5865F2;
    --accent-hover: #6d7af5;
    --success: #57F287;
    --error: #ED4245;
    --warning: #FEE75C;

    --glow: rgba(88, 101, 242, 0.4);
    --accent-glow: rgba(88, 101, 242, 0.25);
    --success-glow: rgba(87, 242, 135, 0.25);
    --error-glow: rgba(237, 66, 69, 0.25);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Global Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Custom Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(88, 101, 242, 0.35); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(88, 101, 242, 0.6); }

/* ── Shared: Action Button ──────────────────────────────── */
.action-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #4752c4);
    color: #fff;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    width: 100%;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.action-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: inherit;
}

.action-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--glow), 0 2px 8px rgba(0,0,0,0.4);
    filter: brightness(1.08);
}

.action-button:hover:not(:disabled)::after { opacity: 1; }

.action-button:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(0.95);
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

/* ── Shared: Badges ─────────────────────────────────────── */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(87, 242, 135, 0.12);
    color: var(--success);
    border: 1px solid rgba(87, 242, 135, 0.2);
}

.badge-error {
    background: rgba(237, 66, 69, 0.12);
    color: var(--error);
    border: 1px solid rgba(237, 66, 69, 0.2);
}

/* ── Shared: Animations ─────────────────────────────────── */
@keyframes slideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

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

@keyframes pulse {
    0%   { box-shadow: 0 0 18px var(--glow) inset, 0 0 0 0 var(--glow); }
    70%  { box-shadow: 0 0 28px var(--glow) inset, 0 0 0 14px rgba(88,101,242,0); }
    100% { box-shadow: 0 0 18px var(--glow) inset, 0 0 0 0  rgba(88,101,242,0); }
}

@keyframes rotateBorder {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

@keyframes particleFloat {
    0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
    50%  { transform: translateY(-60px) translateX(20px) scale(1.1); opacity: 0.3; }
    100% { transform: translateY(-120px) translateX(-10px) scale(0.8); opacity: 0; }
}

@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

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

.animate {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ═══════════════════════════════════════════════════════════
   OAUTH VERIFICATION PAGE
   ═══════════════════════════════════════════════════════════ */

.verify-body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(ellipse at 15% 50%, rgba(88,101,242,0.12), transparent 40%),
        radial-gradient(ellipse at 85% 20%, rgba(237,66,69,0.07), transparent 35%),
        radial-gradient(ellipse at 50% 90%, rgba(87,242,135,0.05), transparent 35%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Floating particles background */
.verify-body::before,
.verify-body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.verify-body::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(88,101,242,0.15), transparent 70%);
    top: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite;
}

.verify-body::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(237,66,69,0.1), transparent 70%);
    bottom: -80px;
    right: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.verify-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 490px;
    padding: 24px;
}

.verify-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 36px;
    text-align: center;
    box-shadow:
        0 40px 80px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 50px var(--glow);
    transform: translateY(24px);
    opacity: 0;
    animation: slideUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

/* Card top accent line */
.verify-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.8;
}

.verify-card h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.verify-card p.message {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 28px;
}

/* ── Icon Container ─────────────────────────────────────── */
.icon-container {
    width: 88px;
    height: 88px;
    margin: 0 auto 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 30px var(--glow) inset;
    transition: var(--transition);
    animation: pulse 2.5s infinite;
    position: relative;
}

/* Rotating gradient ring around icon */
.icon-container::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        var(--accent) 25%,
        transparent 50%,
        var(--accent) 75%,
        transparent 100%
    );
    animation: rotateBorder 3s linear infinite;
    opacity: 0.6;
    z-index: -1;
}

.icon-container::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--bg-main);
    z-index: -1;
}

.icon-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

/* ── User Profile Card ──────────────────────────────────── */
.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    text-align: left;
    transition: var(--transition);
}

.user-profile:hover {
    border-color: var(--border-hover);
    background: rgba(0,0,0,0.35);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    flex-shrink: 0;
}

.username {
    font-weight: 600;
    font-size: 15px;
    display: block;
    color: #fff;
}

.email {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
    word-break: break-all;
}

.footer {
    margin-top: 28px;
    font-size: 11px;
    color: rgba(160,165,177,0.5);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── OTP Input ──────────────────────────────────────────── */
#otpCode {
    transition: border-color 0.3s, box-shadow 0.3s !important;
}

#otpCode:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

/* ═══════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #13151c;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.close-modal {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition);
    background: rgba(255,255,255,0.04);
}

.close-modal:hover {
    background: rgba(237,66,69,0.15);
    color: var(--error);
}

.modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
}

.modal-body p { margin-bottom: 14px; }
.modal-body p:last-child { margin-bottom: 0; }

.modal-body strong { color: rgba(255,255,255,0.85); }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════ */
.dashboard-body {
    background-color: var(--bg-dashboard);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    padding: 0 8px;
    letter-spacing: 1px;
    text-shadow: 0 0 20px var(--accent-glow);
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(160,165,177,0.4);
    padding: 0 12px;
    margin-bottom: 8px;
    margin-top: 16px;
}

.nav-item {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--dashboard-text-muted);
    font-weight: 500;
    font-size: 14px;
    user-select: none;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(88,101,242,0.08);
    color: rgba(255,255,255,0.85);
    border-color: rgba(88,101,242,0.12);
}

.nav-item.active {
    background: rgba(88,101,242,0.15);
    color: var(--accent);
    border-color: rgba(88,101,242,0.2);
    box-shadow: 0 0 20px rgba(88,101,242,0.1) inset;
}

.nav-item .nav-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: rgba(160,165,177,0.35);
    letter-spacing: 0.3px;
    text-align: center;
}

/* ── Main Content Area ──────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 36px 40px;
    min-height: 100vh;
}

/* ── Page Header ────────────────────────────────────────── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 50%, rgba(255,255,255,0.5));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(88,101,242,0.12);
    border: 1px solid rgba(88,101,242,0.2);
    color: var(--accent);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.refresh-btn:hover {
    background: rgba(88,101,242,0.22);
    border-color: rgba(88,101,242,0.35);
    box-shadow: 0 4px 16px rgba(88,101,242,0.2);
    transform: translateY(-1px);
}

.refresh-btn:active { transform: translateY(0); }

/* ── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--dashboard-card-bg);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: default;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* Left colored bar */
.stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.stat-card.success::before { background: var(--success); }
.stat-card.error::before   { background: var(--error); }

/* Subtle gradient background effect */
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(88,101,242,0.03), transparent 60%);
    pointer-events: none;
}

.stat-card.success::after { background: linear-gradient(135deg, rgba(87,242,135,0.04), transparent 60%); }
.stat-card.error::after   { background: linear-gradient(135deg, rgba(237,66,69,0.04), transparent 60%); }

.stat-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--dashboard-text-muted);
    margin-bottom: 12px;
}

.stat-value {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    animation: counterUp 0.6s ease forwards;
}

.stat-card.success .stat-value { color: var(--success); }
.stat-card.error   .stat-value { color: var(--error); }

/* ── Table Container ────────────────────────────────────── */
.table-container,
.table-wrapper {
    background: var(--dashboard-card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
    transition: var(--transition);
}

.table-container:hover,
.table-wrapper:hover {
    border-color: var(--border-hover);
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.15);
}

.table-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.2px;
}

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

thead { background: rgba(0,0,0,0.1); }

th {
    padding: 14px 20px;
    color: rgba(160,165,177,0.7);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    transition: background 0.2s;
}

tr:last-child td { border-bottom: none; }

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover td {
    background: rgba(88,101,242,0.05);
}

.ip-text {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(160,165,177,0.7);
    background: rgba(0,0,0,0.2);
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid var(--border);
    display: inline-block;
}

/* ── Loading State ──────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    height: 14px;
}

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
    padding: 60px 24px;
    text-align: center;
    color: var(--dashboard-text-muted);
}

.empty-state .empty-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state p { font-size: 14px; opacity: 0.6; }

/* ── Status Dot ─────────────────────────────────────────── */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    box-shadow: 0 0 8px var(--success-glow);
    animation: pulse 2s infinite;
    margin-right: 6px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Dashboard flex column on mobile to prevent content hiding */
    .dashboard-body {
        flex-direction: column;
    }

    /* Dashboard sidebar */
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .logo { margin-bottom: 0; }

    .main-content {
        margin-left: 0;
        padding: 24px 16px;
    }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Verification page */
    .verify-body {
        align-items: flex-start;
        padding-top: 24px;
        padding-bottom: 40px;
    }

    .verify-container {
        padding: 12px;
        max-width: 100%;
    }

    .verify-card {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .verify-card h1 {
        font-size: 18px;
    }

    .verify-card p.message {
        font-size: 13px;
    }

    .icon-container {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }

    .user-profile {
        padding: 12px 14px;
        gap: 12px;
    }

    .avatar {
        width: 42px;
        height: 42px;
    }

    .username { font-size: 14px; }
    .email { font-size: 11px; }

    /* OTP input */
    #otpCode {
        font-size: 20px !important;
        letter-spacing: 6px !important;
        padding: 12px !important;
    }

    /* TOS checkbox area */
    .verify-card form label {
        font-size: 12px !important;
    }

    /* Action button */
    .action-button {
        padding: 13px 24px;
        font-size: 14px;
    }

    /* Modal */
    .modal { padding: 12px; }
    .modal-content { max-height: 90vh; }
    .modal-header { padding: 16px 18px; }
    .modal-header h2 { font-size: 15px; }
    .modal-body { padding: 16px 18px; font-size: 13px; }
    .modal-footer { padding: 14px 18px; }
}

@media (max-width: 480px) {
    /* Dashboard */
    .stats-grid { grid-template-columns: 1fr; }

    /* Verification page */
    .verify-card {
        padding: 24px 16px;
        border-radius: 14px;
    }

    .verify-card h1 { font-size: 16px; }
    .verify-card p.message { font-size: 12px; }

    .icon-container {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }

    #otpCode {
        font-size: 18px !important;
        letter-spacing: 4px !important;
    }

    .user-profile {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .footer { font-size: 10px; }
}
