@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-primary: #06090f;
    --bg-secondary: #0d1421;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(88, 160, 255, 0.3);
    --text-primary: #f0f4ff;
    --text-secondary: #8b9dc3;
    --text-muted: #4a5a7a;
    --accent-blue: #3d8eff;
    --accent-purple: #8b5cf6;
    --accent-cyan: #22d3ee;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
    --gradient-btn: linear-gradient(135deg, #3d8eff 0%, #8b5cf6 100%);
    --gradient-card: linear-gradient(135deg, rgba(61, 142, 255, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    --shadow-glow: 0 0 30px rgba(61, 142, 255, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ======= SCROLLBAR ======= */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: rgba(61, 142, 255, 0.4);
    border-radius: 3px;
}

/* Navbar styles removed - using nav.php */

/* ======= HERO ======= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 24px 60px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(61, 142, 255, 0.12);
    top: -100px;
    left: -100px;
    animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.1);
    bottom: -80px;
    right: -80px;
    animation: orbFloat 10s ease-in-out infinite reverse;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(34, 211, 238, 0.07);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat 12s ease-in-out infinite;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(61, 142, 255, 0.1);
    border: 1px solid rgba(61, 142, 255, 0.25);
    border-radius: 999px;
    font-size: 13px;
    color: var(--accent-cyan);
    font-weight: 500;
    margin-bottom: 28px;
    animation: fadeInDown 0.8s ease;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-title span {
    background: var(--gradient-btn);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* ======= SEARCH BOX ======= */
.search-container {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.search-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(61, 142, 255, 0.15), 0 4px 24px rgba(0, 0, 0, 0.3);
}

.country-select {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.04);
    border-right: 1px solid var(--border);
    cursor: pointer;
    min-width: 100px;
    position: relative;
}

.country-flag {
    font-size: 20px;
}

.country-code {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.country-chevron {
    color: var(--text-muted);
    font-size: 12px;
}

.search-input {
    flex: 1;
    padding: 18px 20px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 0 28px;
    background: var(--gradient-btn);
    border: none;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-btn:hover {
    opacity: 0.9;
    transform: translateX(-1px);
}

.search-btn:active {
    transform: scale(0.97);
}

.search-hint {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-muted);
}

.search-hint span {
    color: var(--accent-blue);
    cursor: pointer;
}

.search-hint span:hover {
    text-decoration: underline;
}

/* ======= COUNTRY DROPDOWN ======= */
.country-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 260px;
    background: #151d2e;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    z-index: 200;
    display: none;
    overflow: hidden;
    animation: fadeInDown 0.2s ease;
}

.country-dropdown.open {
    display: block;
}

.country-search {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.country-search input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.country-list {
    max-height: 240px;
    overflow-y: auto;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
}

.country-item:hover {
    background: var(--bg-card-hover);
}

.country-item.active {
    background: rgba(61, 142, 255, 0.1);
    color: var(--accent-blue);
}

.country-item-code {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

/* ======= STATS ======= */
.stats-strip {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 32px;
    margin-top: 48px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 26px;
    font-weight: 800;
    background: var(--gradient-btn);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ======= RECENT SEARCHES ======= */
.recent-section {
    padding: 60px 24px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recent-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.recent-chip:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
    background: rgba(61, 142, 255, 0.08);
}

.recent-chip .chip-icon {
    font-size: 16px;
}

.recent-chip .chip-remove {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1;
    margin-left: 4px;
}

.recent-chip .chip-remove:hover {
    color: var(--accent-red);
}

/* ======= FEATURES ======= */
.features-section {
    padding: 60px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.feature-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-btn);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.feature-icon-blue {
    background: rgba(61, 142, 255, 0.15);
}

.feature-icon-purple {
    background: rgba(139, 92, 246, 0.15);
}

.feature-icon-green {
    background: rgba(16, 185, 129, 0.15);
}

.feature-icon-orange {
    background: rgba(245, 158, 11, 0.15);
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ======= RESULT PANEL ======= */
.result-panel {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.result-panel.open {
    display: flex;
    animation: panelIn 0.3s ease;
}

.result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.result-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    background: #0d1421;
    border: 1px solid var(--border);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
    animation: sheetUp 0.3s ease;
}

@keyframes sheetUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.result-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.result-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-btn);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    border: 3px solid var(--border);
}

.result-info {
    flex: 1;
}

.result-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.result-name {
    font-size: 15px;
    color: var(--text-secondary);
}

.result-badges {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-spam {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-safe {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-id {
    background: rgba(61, 142, 255, 0.15);
    color: #3d8eff;
    border: 1px solid rgba(61, 142, 255, 0.3);
}

.badge-global {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ======= TAGS ======= */
.result-section {
    margin-bottom: 24px;
}

.result-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gradient-card);
    border: 1px solid rgba(61, 142, 255, 0.15);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: default;
}

.tag-bubble:hover {
    border-color: var(--accent-blue);
    transform: scale(1.02);
}

.tag-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-muted);
}

.tag-type-SPAM .tag-count {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.tag-type-PERSONAL .tag-count {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.no-tags {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 15px;
}

/* ======= RESULT ACTIONS ======= */
.result-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.btn-action {
    flex: 1;
    min-width: 120px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary-action {
    background: var(--gradient-btn);
    color: white;
}

.btn-primary-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger-action {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger-action:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-neutral-action {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-neutral-action:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

/* ======= LOADING ======= */
.loading-state {
    text-align: center;
    padding: 48px 0;
    display: none;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ======= ERROR STATE ======= */
.error-state {
    text-align: center;
    padding: 32px;
    display: none;
}

.error-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

.error-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.error-msg {
    color: var(--text-secondary);
    font-size: 14px;
}

.error-hint {
    margin-top: 16px;
    padding: 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-orange);
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
}

.error-hint a {
    color: var(--accent-blue);
}

/* ======= TOKEN WARNING BANNER ======= */
.token-banner {
    display: none;
    padding: 14px 24px;
    background: rgba(245, 158, 11, 0.08);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    text-align: center;
    font-size: 14px;
    color: var(--accent-orange);
    z-index: 99;
    position: relative;
}

.token-banner.visible {
    display: block;
}

.token-banner a {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* ======= TOAST ======= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    background: #1a2640;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    animation: toastIn 0.3s ease;
    max-width: 280px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ======= FOOTER ======= */
footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}

footer strong {
    color: var(--text-secondary);
}

/* ======= ANIMATIONS ======= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes panelIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ======= RESPONSIVE ======= */
@media (max-width: 991px) {
    .hero-title {
        font-size: clamp(32px, 8vw, 48px);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
    }

    .hero {
        padding: 100px 16px 40px;
    }

    .stats-strip {
        gap: 16px;
    }

    .stat-item {
        flex: 1;
        min-width: 140px;
    }

    .stat-number {
        font-size: 22px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .navbar-actions .btn-outline-sm:not(:last-child) {
        display: none;
    }

    .navbar-brand .brand-name {
        font-size: 18px;
    }

    .search-box {
        flex-direction: column;
        background: transparent;
        border: none;
        box-shadow: none;
        gap: 10px;
    }

    .country-select {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        border-right: none;
        height: 54px;
    }

    .search-input {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        height: 54px;
        width: 100%;
    }

    .search-btn {
        height: 54px;
        border-radius: var(--radius-sm);
        justify-content: center;
        width: 100%;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 14px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }

    .result-sheet {
        border-radius: 20px 20px 0 0;
        padding: 24px 16px;
        max-height: 95vh;
    }

    .result-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .result-number {
        font-size: 18px;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
    }

    .tag-bubble {
        font-size: 13px;
        padding: 8px 12px;
    }
}