:root {
    --bg-color: #0F172A;
    --card-bg: #1E293B;
    --text-main: #F8FAFC;
    --accent: #06B6D4;
    --accent-hover: #0891B2;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.by {
    font-size: 0.8rem;
    color: #94A3B8;
    margin-left: 0.5rem;
    font-weight: 300;
}

/* Nav Pills Style */
#main-nav {
    display: flex;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.5);
    padding: 0.5rem;
    border-radius: 2rem;
    flex-wrap: wrap;
}

#main-nav a {
    color: #94A3B8;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#main-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

#main-nav a.active {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.hero {
    text-align: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--accent);
    background: linear-gradient(to right, var(--accent), #3B82F6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-area {
    border: 2px dashed #334155;
    border-radius: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.3);
    max-width: 600px;
    margin: 0 auto;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #475569;
    color: #94A3B8;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

#result-container,
#progress-container {
    text-align: center;
    padding: 4rem;
}

.spinner {
    border: 4px solid #1E293B;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.info-box {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #cbd5e1;
    padding: 1rem 1.5rem;
    border-radius: 0.8rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
    border-left: 4px solid var(--accent);
}

.info-box strong {
    color: var(--accent);
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.privacy-banner {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .app-container {
        padding: 0.5rem;
    }

    header {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-bottom: 2rem;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    #main-nav {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        /* Scrollbar hiding helpers */
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    #main-nav::-webkit-scrollbar {
        display: none;
    }

    #main-nav a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .privacy-banner {
        flex-direction: column;
        font-size: 0.75rem;
        text-align: center;
    }

    .tool-box {
        padding: 1.5rem !important;
        /* Force override inline styles */
        grid-template-columns: 1fr !important;
    }

    .id-field {
        grid-column: span 1 !important;
    }

    button {
        width: 100%;
        margin-top: 0.5rem;
    }

    /* Ensure tool-box specific buttons like copy don't get full width unless needed */
    .copy-input button {
        width: auto;
        margin-top: 0;
    }
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.dash-card {
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: #0f172a;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
}

.dash-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.dash-card h3 {
    margin: 0.5rem 0;
    color: white;
    font-size: 1.1rem;
}

.dash-card p {
    margin: 0;
    color: #94A3B8;
    font-size: 0.9rem;
}

/* Ensure logo interaction looks clickable */
header .logo:hover {
    opacity: 0.8;
}

/* Utilities (New) */
:root {
    --text-slate: #94A3B8;
}

.cursor-pointer {
    cursor: pointer;
}

.w-full {
    width: 100%;
}

.h-100px {
    height: 100px;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mr-4 {
    margin-right: 1rem;
}

.ml-4 {
    margin-left: 1rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-8 {
    padding: 2rem;
}

.text-cyan {
    color: var(--accent);
}

.text-slate {
    color: var(--text-slate);
}

.bg-slate-800 {
    background: #1E293B;
}

.bg-slate-900 {
    background: #0F172A;
}

.bg-green {
    background: #10B981;
}

.bg-red {
    background: #EF4444;
}

.bg-transparent {
    background: transparent;
}

.border-slate {
    border: 1px solid #334155;
}

.border-cyan {
    border: 1px solid var(--accent);
}

.border-none {
    border: none;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 1rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
    align-items: center;
}

.flex-start {
    justify-content: flex-start;
}

.flex-1 {
    flex: 1;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-xs {
    font-size: 0.8rem;
}

.text-sm {
    font-size: 0.9rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.1rem;
}

.text-xl {
    font-size: 1.5rem;
}

.font-mono {
    font-family: monospace;
}

.word-break {
    word-break: break-all;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.max-w-500 {
    max-width: 500px;
    margin: 0 auto;
}

.max-w-600 {
    max-width: 600px;
    margin: 0 auto;
}

.input-std {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background: #1E293B;
    color: white;
    margin-bottom: 1rem;
}

.input-sm {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: #0F172A;
    border: 1px solid #334155;
    color: white;
}

.result-box-std {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.divider {
    height: 1px;
    background: #334155;
    margin-top: 0.5rem;
}

/* Panic Button & Tips */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.panic-btn {
    background: #EF4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.panic-btn:hover {
    background: #DC2626;
}

.risk-tips {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
}

.risk-tips ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.secure-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    border: 1px solid #34D399;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #1E293B;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 100;
    top: 125%;
    /* Below the element */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    font-weight: normal;
    background: #0f172a;
    border: 1px solid #334155;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #334155 transparent;
}