:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --strength-weak: #ef4444;
    --strength-med: #f59e0b;
    --strength-strong: #10b981;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.app-container {
    width: 95%;
    max-width: 900px;
    padding: 2rem 0 4rem;
    margin: 0 auto;
}

.top-nav {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
}

.return-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--card-border);
}

.return-link svg {
    width: 16px;
    height: 16px;
}

.return-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.app-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.generator-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    max-width: 100%;
}

.display-wrapper {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.passphrase-output {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 500;
    word-break: break-all;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.display-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.icon {
    width: 20px;
    height: 20px;
}

.strength-indicator {
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

#strength-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-wrapper {
    margin-bottom: 2rem;
}

.primary-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

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

.primary-btn:active {
    transform: scale(0.98);
}

.divider {
    border: 0;
    border-top: 1px solid var(--card-border);
    margin: 1.5rem 0;
}

.setting-group {
    margin-bottom: 1.25rem;
}

.label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

#word-count-display {
    color: var(--primary-color);
    font-weight: 700;
}

.range-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    cursor: pointer;
}

.separator-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.separator-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.separator-btn:hover {
    color: var(--text-main);
}

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

.app-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .generator-card {
        padding: 1.5rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* SEO Article Styling */
.seo-article {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-main);
}

.seo-article h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2.5rem 0 1.25rem;
    color: var(--text-main);
    line-height: 1.3;
}

.seo-article h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.seo-article p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.seo-article strong {
    color: var(--text-main);
}

.seo-article ul,
.seo-article ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.seo-article li {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.article-img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 500px;
}

th,
td {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}

th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    font-weight: 600;
}

td {
    color: var(--text-muted);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

.seo-article a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-color);
    transition: all 0.2s;
}

.seo-article a:hover {
    color: var(--primary-hover);
    border-bottom-style: solid;
}