@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Neutral Colors - Light (Default) */
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Spacing */
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-body: #111827;
    /* Gray 900 */
    --bg-card: #1f2937;
    /* Gray 800 */
    --text-main: #f9fafb;
    /* Gray 50 */
    --text-muted: #9ca3af;
    /* Gray 400 */
    --border: #374151;
    /* Gray 700 */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-fluid {
    width: 90%;
    padding: 0 2rem;
    margin: 0 auto;
}

@media (min-width: 1280px) {
    .container-fluid {
        padding: 0 4rem;
    }
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.grid {
    display: grid;
}

.w-full {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background-color: var(--bg-body);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-group small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
input[type="file"] {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Navbar */
.navbar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar .brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .brand span {
    color: var(--primary);
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 1.5rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Auth Pages */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    align-items: start;
}

@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1.25rem 0;
    color: var(--text-main);
}

/* Link Items in Dashboard */
.link-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s;
}

.link-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--text-muted);
}

.link-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.link-icon-preview {
    width: 40px;
    height: 40px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 1rem;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-body) 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 1.25rem;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* Checkbox Toggle Styled */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Footer */
.footer {
    margin-top: auto;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    width: 100%;
}

.footer a {
    color: var(--text-main);
    font-weight: 500;
}

.footer a:hover {
    color: var(--primary);
}