/* ============================================================================
   SHARED THEME - Empire-LLM
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700&display=swap');

:root {
    font-family: 'Public Sans', 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    font-weight: 400;

    /* Default Primary Color: Indigo (#6366f1) -> 99 102 241 */
    --primary-rgb: 99 102 241;
    --primary-color: rgb(var(--primary-rgb));

    /* Dark Background RGB */
    --dark-bg-rgb: 37 41 60;
    --dark-card-rgb: 47 51 73;
    /* Default derived */

    /* Dark theme colors */
    --dark-bg: rgb(var(--dark-bg-rgb));
    --dark-card: rgb(var(--dark-card-rgb));
    --dark-text: #cfd3ec;
    --dark-muted: #7983bb;
    --dark-border: #434968;
    --dark-input: #3b405e;

    /* Light theme colors */
    --light-bg: #f8f7fa;
    --light-card: #ffffff;
    --light-text: #5d596c;
    --light-muted: #a5a3ae;
    --light-border: #dbdade;
    --light-input: #ffffff;
}

/* Light theme defaults */
:root {
    --bg-primary: var(--light-bg);
    --bg-secondary: var(--light-card);
    --bg-tertiary: var(--light-input);
    --border-color: var(--light-border);
    --text-primary: var(--light-text);
    --text-secondary: var(--light-text);
    --text-tertiary: var(--light-muted);
}

/* Dark theme overrides */
.dark {
    --bg-primary: var(--dark-bg);
    --bg-secondary: var(--dark-card);
    --bg-tertiary: var(--dark-input);
    --border-color: var(--dark-border);
    --text-primary: var(--dark-text);
    --text-secondary: var(--dark-text);
    --text-tertiary: var(--dark-muted);
}

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.text-muted {
    color: var(--text-tertiary);
}

.h-8 {
    height: 2rem;
}

.w-auto {
    width: auto;
}

.fill-current {
    fill: currentColor;
}

.gap-2 {
    gap: 0.5rem;
}

.flex-center {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgb(var(--primary-rgb) / 0.39);
    /* Text shadow for visibility on light backgrounds */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background-color: rgb(var(--primary-rgb) / 0.9);
    box-shadow: 0 6px 20px rgb(var(--primary-rgb) / 0.23);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgb(var(--primary-rgb) / 0.05);
}

.card {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    width: 100%;
}

.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.dark .input-field {
    background-color: var(--bg-tertiary);
    /* Darker input background for dark mode */
    border-color: rgba(255, 255, 255, 0.08);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(var(--primary-rgb) / 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Social Login Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider::before {
    margin-right: 1rem;
}

.divider::after {
    margin-left: 1rem;
}

/* Social Buttons */
.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

* {
    box-sizing: border-box;
}

a.btn-social {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary) !important;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-decoration: none !important;
}

a.btn-social:visited {
    color: var(--text-primary) !important;
}

.btn-social::before {
    content: "";
    position: absolute;
    top: -140%;
    left: -150%;
    width: 70%;
    height: 380%;
    transform: rotate(22deg) translateX(0);
    transition: transform 0.65s ease;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 40%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.08) 60%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
}

.btn-social > * {
    position: relative;
    z-index: 1;
}

.btn-social:hover {
    border-color: var(--text-tertiary);
    transform: translateY(-1px);
}

.btn-social:hover::before {
    transform: rotate(22deg) translateX(420%);
}

/* Brand Colors can be optional, keeping them neutral/dark often looks more premium */
.btn-social.google:hover {
    border-color: #ea4335;
    background: rgba(234, 67, 53, 0.05);
}

.btn-social.github:hover {
    border-color: var(--text-primary);
}

.btn-social.x-twitter:hover {
    border-color: var(--text-primary);
}

a.btn-social.brand-google,
a.btn-social.brand-google:visited {
    background: #db4437;
    color: #ffffff !important;
    border-color: #db4437;
    box-shadow: 0 8px 18px rgba(219, 68, 55, 0.3);
}

a.btn-social.brand-google:hover {
    background: #c53929;
    border-color: #c53929;
}

a.btn-social.brand-x,
a.btn-social.brand-x:visited {
    background: #111111;
    color: #ffffff !important;
    border-color: #111111;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

a.btn-social.brand-x:hover {
    background: #000000;
    border-color: #000000;
}

.dark a.btn-social.brand-x,
.dark a.btn-social.brand-x:visited {
    background: #050505;
    border-color: #050505;
}

.google-auth-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0.01;
    overflow: hidden;
}
