:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #1f6feb;
    --border: #30363d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --glass: rgba(22, 27, 34, 0.7);
    --gradient: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
}

.light-theme {
    --bg-color: #ffffff;
    --card-bg: #f6f8fa;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --accent: #0969da;
    --accent-hover: #0550ae;
    --border: #d0d7de;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.7);
    --gradient: linear-gradient(135deg, #0969da 0%, #8a57e6 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--accent);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
}

.alert {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
footer {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

/* Auth Layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
    /* Adjust for header/footer */
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    text-align: center;
}

.card-subtitle {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-description {
    color: var(--text-secondary);
}

.scan-section-card {
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    margin-bottom: 1rem;
    text-align: center;
}

.scan-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.scan-input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-color);
    color: var(--text-primary);
}

.recent-scans-container {
    margin: 0 auto;
}

.scans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.scan-item-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.scan-item-content {
    margin-bottom: auto;
}

.scan-target-url {
    font-size: 1.2rem;
    word-break: break-all;
}

.scan-timestamp {
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

.scan-history {
    margin-top: 2rem;
}

.scan-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scan-item:last-child {
    border-bottom: none;
}

/* Pricing Layout */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.price-card {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.price-sub {
    font-size: 1rem;
    color: var(--text-secondary);
}

.features-list {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
    color: var(--text-secondary);
}