:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-secondary: #64748b;
    --color-success: #059669;
    --color-error: #dc2626;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--color-surface);
    box-shadow: var(--shadow);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.user-name {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.main {
    flex: 1;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.footer {
    background: var(--color-surface);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

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

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

.btn-secondary {
    background: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.auth-form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.auth-form-container h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form .btn {
    margin-top: 0.5rem;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--color-text-muted);
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.btn-google {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.btn-google:hover {
    background: #f8f8f8;
}

.btn-facebook {
    background: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background: #166fe5;
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-links a {
    color: var(--color-primary);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links a + a {
    margin-left: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-error {
    background: #fef2f2;
    color: var(--color-error);
}

.alert-success {
    background: #f0fdf4;
    color: var(--color-success);
}

.dashboard h1 {
    margin-top: 0;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: var(--color-surface);
    padding: 0.88rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card h3 {
    margin-top: 0;
}

.keyword-primary {
    font-weight: bold;
    margin-bottom: 10px;
}

.keyword-analysis {
    margin-top: 10px;
    font-weight: 500;
}

.keyword-suggestion {
    display: inline-block;
    padding: 6px 10px;
    margin: 4px;
    background: #f3f3f3;
    border-radius: 6px;
    cursor: pointer;
}

.keyword-suggestion:hover {
    background: #e3e3e3;
}
