@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-dark: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --danger: #ef4444;
    --success: #22c55e;
    --border: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
}

/* Side Navigation */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transform: translateX(-100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.logo {
    /* ... existing logo styles ... */
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary);
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    margin-left: 0;
    width: 100%;
    flex-grow: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.hero-section {
    max-width: 800px;
    width: 100%;
    text-align: center;
    margin-top: 10vh;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analyzer-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
}

.omni-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.3s ease;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.omni-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.btn-omni-plus {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--glass-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.btn-omni-plus:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: rotate(90deg);
}

.omni-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 8px;
    width: 220px;
    border-radius: 16px;
    padding: 8px;
    display: none;
    flex-direction: column;
    z-index: 1001;
    animation: menuFadeIn 0.2s ease-out;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.omni-menu.active {
    display: flex;
}

.omni-menu-item {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.omni-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.omni-field {
    width: 100%;
    background: transparent !important;
    border: none !important;
    padding: 10px 16px;
    color: var(--text-main) !important;
    font-size: 1rem;
    outline: none !important;
    resize: none;
}

.btn-omni-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.btn-omni-send:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.btn-omni-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.is-phishing {
    color: var(--danger);
    border-color: var(--danger);
}

.is-safe {
    color: var(--success);
    border-color: var(--success);
}



/* History Section */
.history-section {
    margin-top: 4rem;
    padding-bottom: 5rem;
    animation: fadeIn 1s ease;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-left: 4px solid transparent;
}

.history-item:hover {
    background: rgba(0, 0, 0, 0.03);
    transform: translateX(8px);
    border-color: var(--primary);
}

.btn-view-more {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 24px;
    border-radius: 100px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.btn-view-more:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    border-color: var(--primary);
}

.history-info {
    flex-grow: 1;
    overflow: hidden;
}

.history-url {
    font-weight: 500;
    color: var(--text-main);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.history-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-phishing {
    background-color: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

.dot-safe {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.dot-suspect {
    background-color: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
}

.history-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-phishing {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-safe {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-suspect {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}


/* ====== History Detail Box ====== */
.history-detail {
    animation: detailFadeIn 0.25s ease-out;
    overflow: hidden;
}

@keyframes detailFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 0 1.5rem;
}

.detail-content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-radius: 0 0 16px 16px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-label i {
    color: var(--primary);
    font-size: 0.8rem;
}

.detail-value {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
}

.detail-description {
    font-size: 0.875rem;
    color: var(--text-main);
    line-height: 1.65;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    backdrop-filter: blur(6px);
}

/* ====== Statistics Page ====== */
.stat-card {
    padding: 1.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #1e293b, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-bar-label {
    width: 70px;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.stat-bar-track {
    flex-grow: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
}

.stat-bar-value {
    width: 30px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid transparent;
    font-size: 0.85rem;
}

/* Animations & Responsive */
.loading-spinner {
    display: none;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-top: 2rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 1.5rem 1rem;
    }

    .sidebar .logo span,
    .sidebar .nav-link span {
        display: none;
    }

    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 640px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .input-wrapper {
        border-radius: 20px;
        flex-direction: column;
    }

    .btn-analyze {
        width: 100%;
        border-radius: 12px;
    }
}