/* Word Unscrambler - Main Stylesheet */
/* Modern, Mobile-First, SEO-Optimized */

/* ===== CSS Variables ===== */
:root {
    --color-primary: #DC2626;
    --color-primary-dark: #B91C1C;
    --color-primary-light: #EF4444;
    --color-secondary: #64748b;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-border: #e2e8f0;
    --color-green: #22c55e;
    --color-yellow: #eab308;
    --color-gray: #6b7280;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px 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);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 150ms ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 1rem;
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin: 0 0 1rem;
}

ul,
ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Utilities ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-narrow {
    max-width: 800px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
}

.btn-secondary {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===== Header ===== */
.header {
    background: white;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 200px;
}

.logo-icon {
    height: 42px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Larger logo when showing logo only (no text) */
.logo-large {
    height: 55px;
    width: auto;
    max-width: 220px;
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 0.95rem;
        max-width: 150px;
        white-space: normal;
        line-height: 1.2;
    }

    .logo-icon {
        height: 36px;
        width: auto;
    }

    .logo-large {
        height: 45px;
        max-width: 180px;
    }
}

.main-nav {
    display: none;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--radius);
}

.nav-link:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.dropdown-arrow {
    transition: transform var(--transition);
}

.has-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 0.5rem 0;
    list-style: none;
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
}

.dropdown-menu li a:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition);
}

@media (min-width: 768px) {
    .main-nav {
        display: block;
    }

    .mobile-menu-toggle {
        display: none;
    }
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    background: var(--color-bg-alt);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--color-text-light);
}

.breadcrumb-item a {
    color: var(--color-text-light);
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
}

.breadcrumb-item.active span {
    color: var(--color-text);
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.hero-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1.125rem;
    text-transform: uppercase;
}

.hero-input::placeholder {
    text-transform: none;
}

.search-hint {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.75rem;
}

@media (max-width: 640px) {
    .search-input-wrapper {
        flex-direction: column;
    }
}

/* ===== Tools Grid ===== */
.tools-section,
.features-section,
.how-it-works,
.cta-section {
    padding: 4rem 0;
}

.tools-section {
    background: var(--color-bg-alt);
}

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.tool-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.tool-name {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.tool-description {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    flex: 1;
    margin-bottom: 1rem;
}

.tool-link {
    color: var(--color-primary);
    font-weight: 500;
    font-size: 0.9375rem;
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--color-text-light);
    margin: 0;
}

/* ===== Steps ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    counter-reset: step;
}

.step {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--color-text-light);
    margin: 0;
}

/* ===== CTA ===== */
.cta-section {
    background: var(--color-bg-alt);
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

/* ===== Tool Page Layout ===== */
.tool-page {
    padding: 2rem 0;
}

.tool-header {
    margin-bottom: 2rem;
}

.tool-header h1 {
    margin-bottom: 0.5rem;
}

.tool-intro {
    color: var(--color-text-light);
    font-size: 1.125rem;
    margin-bottom: 0;
}

.disclaimer-inline {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.tool-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .tool-layout {
        grid-template-columns: 1fr 300px;
    }
}

.tool-main {
    min-width: 0;
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== Forms ===== */
.solver-form {
    background: var(--color-bg-alt);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: white;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-large {
    font-size: 1.125rem;
    padding: 1rem 1.25rem;
}

.form-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-top: 0.375rem;
}

.filters-accordion {
    margin-bottom: 1rem;
}

.filters-accordion summary {
    cursor: pointer;
    font-weight: 500;
    padding: 0.75rem 0;
    color: var(--color-primary);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding-top: 1rem;
}

.form-group-wide {
    grid-column: 1 / -1;
}

/* ===== Results ===== */
.results-section {
    margin-bottom: 2rem;
}

.results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.results-header h2 {
    margin: 0;
}

.results-note {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin: 0;
}

.results-controls {
    font-size: 0.875rem;
}

.result-group {
    margin-bottom: 2rem;
}

.group-title {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.words-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.words-grid.compact {
    gap: 0.5rem;
}

.word-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    white-space: nowrap;
}

.word-item:hover {
    border-color: var(--color-primary);
}

.word-link {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.word-score {
    font-size: 0.75rem;
    color: var(--color-text-light);
    white-space: nowrap;
}

.copy-btn {
    padding: 4px;
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition);
}

.copy-btn:hover {
    opacity: 1;
    color: var(--color-primary);
}

.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

.results-more {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* ===== Wordle Specific ===== */
.wordle-inputs .form-group {
    margin-bottom: 1.25rem;
}

.color-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}

.color-indicator.green,
.color-box.green {
    background: var(--color-green);
}

.color-indicator.yellow,
.color-box.yellow {
    background: var(--color-yellow);
}

.color-indicator.gray,
.color-box.gray {
    background: var(--color-gray);
}

.wordle-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.wordle-word {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

.word-letters {
    display: flex;
    gap: 4px;
}

.letter-box {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
}

.wordle-legend {
    font-size: 0.875rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* ===== Connections ===== */
.connections-words {
    margin: 1.5rem 0;
}

.word-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.word-chip {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.connections-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.connection-group {
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.connection-group.confidence-high {
    background: #f0fdf4;
    border-color: #86efac;
}

.connection-group.confidence-medium {
    background: #fefce8;
    border-color: #fde047;
}

.connection-group.confidence-low {
    background: var(--color-bg-alt);
}

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.group-header h3 {
    margin: 0;
    font-size: 1rem;
}

.confidence-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.1);
}

.group-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===== Spelling Bee ===== */
.spelling-bee-input {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.input-center {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.bee-visual {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.honeycomb {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    gap: 4px;
}

.hex {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.hex.center {
    background: var(--color-yellow);
    border-color: var(--color-yellow);
}

.pangram-group {
    background: #fefce8;
    border: 1px solid #fde047;
    padding: 1rem;
    border-radius: var(--radius);
}

.pangram-group h3 {
    color: #854d0e;
}

.word-item.pangram {
    background: #fef9c3;
    border-color: #fde047;
}

/* ===== Letter Boxed ===== */
.letter-boxed-input {
    margin-bottom: 1.5rem;
}

.box-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 300px;
    margin: 0 auto;
}

.box-side input {
    width: 80px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.5rem;
}

.box-middle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.box-center {
    width: 80px;
    height: 80px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
}

.solutions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.solution-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--radius);
}

.solution-words {
    font-weight: 600;
    text-transform: uppercase;
}

.solution-length {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* ===== Tool Content & FAQs ===== */
.tool-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.tool-content h2 {
    margin-top: 2rem;
}

.tool-content h2:first-child {
    margin-top: 0;
}

.tool-content h3 {
    margin-top: 1.5rem;
    font-size: 1.125rem;
}

.faq-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-question {
    padding: 1rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--color-bg-alt);
}

.faq-question:hover {
    background: var(--color-border);
}

.faq-answer {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--color-border);
}

/* ===== Sidebar ===== */
.sidebar-widget {
    background: var(--color-bg-alt);
    padding: 1.25rem;
    border-radius: var(--radius);
}

.sidebar-widget h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.related-tools,
.tips-list,
.category-list,
.pattern-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-tools li,
.tips-list li,
.category-list li,
.pattern-links li {
    padding: 0.375rem 0;
}

.related-tools a,
.category-list a,
.pattern-links a {
    color: var(--color-text);
}

.related-tools a:hover,
.category-list a:hover,
.pattern-links a:hover {
    color: var(--color-primary);
}

.tips-list li {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.sidebar-search {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-search input {
    padding: 0.5rem 0.75rem;
}

/* ===== Results Table ===== */
.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.results-table th {
    background: var(--color-bg-alt);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.results-table tr:hover {
    background: var(--color-bg-alt);
}

.score-cell {
    font-weight: 600;
    color: var(--color-primary);
}

/* ===== Blog ===== */
.blog-page,
.author-page {
    padding: 2rem 0;
}

.page-header {
    margin-bottom: 2rem;
}

.page-intro {
    color: var(--color-text-light);
    font-size: 1.125rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr 280px;
    }
}

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

@media (min-width: 640px) {
    .post-card {
        grid-template-columns: 200px 1fr;
    }
}

.post-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius);
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: var(--color-text);
}

.post-title a:hover {
    color: var(--color-primary);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.post-excerpt {
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.read-more {
    font-weight: 500;
}

/* ===== Blog Post ===== */
.blog-post {
    padding: 2rem 0;
}

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    margin-bottom: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-category {
    padding: 0.25rem 0.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    font-size: 0.75rem;
}

.post-featured-image {
    margin-bottom: 2rem;
}

.post-featured-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.post-content.prose {
    line-height: 1.75;
}

.post-content.prose h2 {
    margin-top: 2rem;
}

.post-content.prose h3 {
    margin-top: 1.5rem;
}

.post-content.prose img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.author-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

.author-box h3 {
    margin-bottom: 1rem;
}

.author-box-content {
    display: flex;
    gap: 1rem;
}

.author-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-details h4 {
    margin-bottom: 0.5rem;
}

.author-details p {
    color: var(--color-text-light);
    margin: 0;
    font-size: 0.9375rem;
}

.related-posts {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.related-posts h3 {
    margin-bottom: 1rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.related-post-card {
    padding: 1rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

.related-post-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.related-post-card h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.related-date {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* ===== Author Page ===== */
.author-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.author-profile {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.author-avatar-xlarge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h1 {
    margin-bottom: 0.25rem;
}

.author-title {
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.author-bio {
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    color: var(--color-text-light);
}

.social-link:hover {
    color: var(--color-primary);
}

/* ===== Word Page ===== */
.word-page {
    padding: 2rem 0;
}

.word-header {
    margin-bottom: 2rem;
}

.word-header h1 {
    font-size: 2.5rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.word-stats {
    display: flex;
    gap: 1.5rem;
}

.word-stats .stat {
    color: var(--color-text-light);
}

.word-section {
    margin-bottom: 2rem;
}

.word-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.word-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    padding: 1rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1.125rem;
    font-weight: 600;
}

.letter-breakdown {
    display: flex;
    gap: 4px;
}

.letter-breakdown .letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
}

.word-not-found {
    text-align: center;
    padding: 2rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

.word-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.see-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
}

/* ===== Static Pages ===== */
.page-content {
    padding: 2rem 0;
}

.page-content h1 {
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.content-section {
    margin-bottom: 2rem;
}

.content-section h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.disclaimer-box {
    padding: 1.5rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.disclaimer-box.prominent {
    background: #fef2f2;
    border-color: #fca5a5;
}

.disclaimer-box h2,
.disclaimer-box h3 {
    margin-top: 0;
    color: #92400e;
}

.disclaimer-box.prominent h2 {
    color: #991b1b;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.data-table th,
.data-table td {
    padding: 0.5rem 1rem;
    text-align: left;
    border: 1px solid var(--color-border);
}

.data-table th {
    background: var(--color-bg-alt);
}

/* ===== Contact Form ===== */
.contact-form {
    max-width: 600px;
    margin-bottom: 2rem;
}

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.required {
    color: var(--color-error);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.page-link {
    padding: 0.5rem 1rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    font-weight: 500;
}

.page-link:hover {
    background: var(--color-border);
}

.page-info {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* ===== Error Pages ===== */
.error-page {
    padding: 4rem 0;
    text-align: center;
}

.error-content h1 {
    font-size: 6rem;
    color: var(--color-primary);
    margin-bottom: 0;
    line-height: 1;
}

.error-content h2 {
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.error-suggestions {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.error-suggestions h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.error-suggestions ul {
    margin: 0;
}

.error-note {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* ===== Footer ===== */
.footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #94a3b8;
    font-size: 0.9375rem;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 0.875rem;
}

.footer .disclaimer {
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.copyright {
    margin: 0;
}

/* ===== Ads ===== */
.ad-container {
    margin: 1.5rem 0;
    min-height: 90px;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-header {
    margin: 0;
}

.ad-sidebar {
    min-height: 250px;
}

/* ===== No Content ===== */
.no-content {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

/* ===== Tools Index ===== */
.tools-index-page {
    padding: 2rem 0;
}

.tools-categories {
    margin-bottom: 2rem;
}

.tool-category {
    margin-bottom: 3rem;
}

.tool-category h2 {
    margin-bottom: 0.5rem;
}

.category-note {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.tools-info {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

/* ===== Mobile Menu ===== */
@media (max-width: 767px) {
    .main-nav.active {
        display: block;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }

    .main-nav.active .nav-list {
        flex-direction: column;
        padding: 1rem;
    }

    .main-nav.active .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }

    .main-nav.active .has-dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* ===== Print Styles ===== */
@media print {

    .header,
    .footer,
    .ad-container,
    .sidebar-widget,
    .tool-sidebar {
        display: none;
    }

    .tool-layout {
        grid-template-columns: 1fr;
    }

    body {
        font-size: 12pt;
    }
}


/* ===== Dictionary Definition Styles ===== */
.definition-section {
    background: var(--color-bg-alt);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
}

.definitions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.meaning-group {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.meaning-group:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.part-of-speech {
    display: inline-block;
    font-style: italic;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.definitions {
    margin: 0;
    padding-left: 1.25rem;
}

.definition-item {
    margin-bottom: 1rem;
}

.definition-item:last-child {
    margin-bottom: 0;
}

.definition-text {
    margin: 0 0 0.5rem;
    line-height: 1.6;
}

.definition-example {
    margin: 0.5rem 0;
    padding: 0.5rem 1rem;
    background: white;
    border-left: 3px solid var(--color-border);
    color: var(--color-text-light);
    font-style: italic;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.definition-synonyms,
.meaning-synonyms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.definition-synonyms .label,
.meaning-synonyms .label {
    color: var(--color-text-light);
    font-weight: 500;
}

.synonym-link {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--color-text);
    transition: all var(--transition);
}

.synonym-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #eff6ff;
}

.definition-source {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.8125rem;
    color: var(--color-text-light);
}

.definition-source a {
    color: var(--color-text-light);
    text-decoration: underline;
}

.definition-source a:hover {
    color: var(--color-primary);
}

/* Phonetic & Audio */
.word-stats .phonetic {
    font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', sans-serif;
    color: var(--color-text);
}

.btn-audio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    margin-top: 0.75rem;
}

.btn-audio:hover {
    background: var(--color-primary-dark);
}

.btn-audio svg {
    flex-shrink: 0;
}

/* Definition Modal for AJAX lookups */
.definition-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.definition-modal.active {
    opacity: 1;
    visibility: visible;
}

.definition-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.definition-modal.active .definition-modal-content {
    transform: translateY(0);
}

.definition-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.definition-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.definition-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 0.25rem;
    line-height: 1;
}

.definition-modal-close:hover {
    color: var(--color-text);
}

.definition-modal-body {
    padding: 1.5rem;
}

.definition-loading {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-light);
}

.definition-error {
    text-align: center;
    padding: 2rem;
    color: var(--color-error);
}

/* Quick definition button on word items */
.word-item .def-btn {
    padding: 4px;
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition);
    margin-left: 4px;
}

.word-item .def-btn:hover {
    opacity: 1;
    color: var(--color-primary);
}


/* ===== Wordle Word Links ===== */
.wordle-word a.word-letters {
    display: flex;
    gap: 4px;
    text-decoration: none;
}

.wordle-word a.word-letters:hover .letter-box {
    border-color: var(--color-primary);
}

/* ===== Solution Links ===== */
.solution-words a {
    color: var(--color-text);
    font-weight: 600;
    text-transform: uppercase;
}

.solution-words a:hover {
    color: var(--color-primary);
}

/* ===== Word Item Improvements ===== */
.word-item .word-link {
    flex-shrink: 0;
}

.word-item .word-length,
.word-item .word-info {
    font-size: 0.75rem;
    color: var(--color-text-light);
    white-space: nowrap;
}

/* ===== Spangram Styling ===== */
.word-item.spangram {
    background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
    border-color: #fcd34d;
}

.word-item.spangram .word-link {
    color: #92400e;
}

/* ===== Table Definition Button ===== */
.results-table .def-btn {
    padding: 4px;
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition);
    vertical-align: middle;
}

.results-table .def-btn:hover {
    opacity: 1;
    color: var(--color-primary);
}


/* ===== Enhanced Homepage Styles ===== */
.hero {
    background: linear-gradient(135deg, #991B1B 0%, #DC2626 50%, #EF4444 100%);
    padding: 4rem 0;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-search {
    max-width: 700px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1.125rem;
    text-transform: uppercase;
    background: transparent;
}

.hero-input:focus {
    outline: none;
}

.hero-input::placeholder {
    text-transform: none;
    color: var(--color-text-light);
}

.search-hint {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .search-input-wrapper {
        flex-direction: column;
        padding: 0.75rem;
    }

    .hero-input {
        text-align: center;
    }
}

/* ===== Games Section ===== */
.games-section {
    padding: 4rem 0;
    background: var(--color-bg-alt);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.game-item {
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.game-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.game-item p {
    color: var(--color-text-light);
    margin: 0;
    font-size: 0.9375rem;
}

/* ===== Content Section ===== */
.content-section {
    padding: 4rem 0;
}

.content-section h2 {
    margin-bottom: 1.5rem;
}

.content-section h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.content-section p {
    color: var(--color-text);
    line-height: 1.7;
}

.content-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ===== Improved Tool Cards ===== */
.tool-card {
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

/* ===== Enhanced CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, #991B1B 0%, #DC2626 100%);
    color: white;
    padding: 4rem 0;
}

.cta-section h2 {
    color: white;
    margin-bottom: 0.75rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.cta-section .btn-primary {
    background: white;
    color: var(--color-primary);
}

.cta-section .btn-primary:hover {
    background: var(--color-bg-alt);
}

/* ===== US-Friendly Typography ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Larger touch targets for mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
    }

    .tool-card {
        padding: 1.25rem;
    }

    .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* ===== Accessibility Improvements ===== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tool-card {
        border-width: 2px;
    }

    .btn-primary {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Word Unscrambler SEO Content Sections ===== */

/* Examples Grid */
.examples-grid {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}

.example-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.example-item .scrambled {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    text-transform: uppercase;
}

.example-item .arrow {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: bold;
}

.example-item .unscrambled {
    font-weight: 600;
    color: var(--color-text);
}

.example-item .unscrambled a {
    color: var(--color-primary);
    text-decoration: none;
}

.example-item .unscrambled a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .example-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .example-item .arrow {
        transform: rotate(90deg);
    }
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.tip-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    transition: all var(--transition);
}

.tip-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.tip-card .tip-number {
    position: absolute;
    top: -12px;
    left: 20px;
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.tip-card h4 {
    margin: 0.5rem 0 0.75rem;
    font-size: 1rem;
    color: var(--color-text);
}

.tip-card p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.tip-card a {
    color: var(--color-primary);
}

/* Steps List */
.steps-list {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.steps-list li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.25rem;
    counter-increment: step-counter;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.steps-list li code {
    background: var(--color-bg-alt);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9375em;
}

/* Letter Values Grid - Enhanced */
.letter-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 2rem;
}

.letter-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.letter-value .points {
    font-weight: 700;
    color: var(--color-primary);
    min-width: 50px;
}

.letter-value .letters {
    color: var(--color-text);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
}

.game-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: all var(--transition);
}

.game-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}

.game-card h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.game-card h4 a {
    color: var(--color-primary);
}

.game-card h4 a:hover {
    text-decoration: underline;
}

.game-card p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

/* Benefits List */
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

.benefits-list li::before {
    content: '✓';
    color: var(--color-success);
    font-weight: bold;
    flex-shrink: 0;
}

.benefits-list li strong {
    color: var(--color-text);
}

/* Tool Content Section Enhancements */
.tool-content section,
section.tool-content {
    margin-bottom: 2rem;
}

.tool-content h2 {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.tool-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.tool-content h3 {
    margin-top: 1.5rem;
}

/* Responsive adjustments for SEO sections */
@media (max-width: 768px) {
    .tips-grid {
        grid-template-columns: 1fr;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .benefits-list {
        grid-template-columns: 1fr;
    }

    .letter-values-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ======================================
   MODERN TOOL PAGE DESIGN ENHANCEMENTS
   ====================================== */

/* Modern Hero-style Tool Headers */
.tool-header {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    margin: -2rem -1rem 2rem -1rem;
    padding: 2.5rem 1.5rem;
    border-radius: 0 0 24px 24px;
    text-align: center;
}

.tool-header h1 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.tool-header .tool-intro {
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .tool-header {
        margin: -2rem 0 2rem 0;
        padding: 3rem 2rem;
        border-radius: 24px;
    }

    .tool-header h1 {
        font-size: 2rem;
    }
}

/* Enhanced Form Styling */
.solver-form {
    background: white;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 2rem;
}

.solver-form .form-group label {
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: 0.625rem;
}

.solver-form input.input-large {
    border: 2px solid var(--color-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.solver-form input.input-large:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.solver-form .btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
    transition: all 0.2s ease;
}

.solver-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* Modern Filters Accordion */
.filters-accordion {
    background: #f9fafb;
    border-radius: 12px;
    padding: 0.25rem 1rem;
    margin-bottom: 1.25rem;
}

.filters-accordion summary {
    padding: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-accordion summary::marker {
    content: '';
}

.filters-accordion summary::before {
    content: '⚙️';
    font-size: 1rem;
}

.filters-accordion[open] summary {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.5rem;
}

.filters-grid {
    padding: 1rem 0;
}

/* Enhanced Results Section */
.results-section {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.results-header {
    border-bottom: none;
    background: linear-gradient(135deg, #fef2f2 0%, white 100%);
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
}

.results-header h2 {
    font-size: 1.125rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-header h2::before {
    content: '✨';
}

/* Modern Word Items */
.word-item {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.word-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.word-link {
    color: var(--color-primary);
    font-weight: 600;
}

.word-score {
    background: rgba(220, 38, 38, 0.1);
    color: var(--color-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.copy-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
    opacity: 1;
    color: #6b7280;
}

.copy-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* Animated Results Appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-group {
    animation: fadeInUp 0.4s ease forwards;
}

/* Result Group Styling */
.result-group {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.group-title {
    background: linear-gradient(135deg, var(--color-primary), #ef4444);
    color: white;
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: none;
}

/* Enhanced No Results */
.no-results {
    background: linear-gradient(135deg, #fef2f2 0%, white 100%);
    border: 1px solid #fecaca;
    border-radius: 16px;
    padding: 3rem 2rem;
}

.no-results p:first-child {
    font-size: 1.125rem;
}

/* Modern Sidebar Widgets */
.sidebar-widget {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.sidebar-widget h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-widget .related-tools,
.sidebar-widget .tips-list,
.sidebar-widget .pattern-links {
    margin: 0;
    padding: 0;
}

.sidebar-widget li {
    list-style: none;
    margin: 0;
    padding: 0.625rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-widget li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-widget li a {
    display: block;
    color: var(--color-text);
    transition: all 0.15s;
    padding-left: 0.5rem;
    border-left: 2px solid transparent;
}

.sidebar-widget li a:hover {
    color: var(--color-primary);
    padding-left: 1rem;
    border-left-color: var(--color-primary);
}

/* Enhanced Tip Cards */
.tip-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), #ef4444);
}

.tip-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), #ef4444);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tip-card h4 {
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.tip-card p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
}

/* Enhanced Game Cards */
.game-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.game-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.game-card h4::before {
    content: '🎮';
    font-size: 1.25rem;
}

.game-card p {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin: 0;
}

/* Enhanced Tool Content Sections */
.tool-content {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.tool-content h2 {
    font-size: 1.25rem;
    border-top: none;
    padding-top: 0;
    margin-top: 2rem;
}

.tool-content h2:first-child {
    margin-top: 0;
}

.tool-content h3 {
    font-size: 1.0625rem;
    color: var(--color-text);
}

/* Enhanced FAQ Section */
.faq-section {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.faq-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--color-primary);
}

.faq-item[open] {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.faq-question {
    padding: 1rem 1.25rem;
    font-weight: 500;
    cursor: pointer;
    background: #f9fafb;
    transition: background 0.15s;
}

.faq-question:hover {
    background: #fef2f2;
}

.faq-item[open] .faq-question {
    background: linear-gradient(135deg, #fef2f2, #fff5f5);
    border-bottom: 1px solid #fecaca;
}

.faq-answer {
    padding: 1rem 1.25rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Enhanced Example Items */
.example-item {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.example-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.example-item .scrambled {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: #f3f4f6;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    color: #6b7280;
}

.example-item .arrow {
    color: var(--color-primary);
    font-size: 1.25rem;
}

.example-item .unscrambled {
    color: var(--color-primary);
    font-weight: 500;
}

/* Enhanced Letter Values Grid */
.letter-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.letter-value {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.letter-value .points {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.letter-value .letters {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    font-family: 'SF Mono', 'Monaco', monospace;
}

/* Steps List Enhancement */
.steps-list {
    counter-reset: step;
    padding-left: 0;
}

.steps-list li {
    list-style: none;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
    counter-increment: step;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--color-primary), #ef4444);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

/* Tools Index Page Enhancements */
.tools-index-page {
    padding-top: 0;
}

.tools-index-page .page-header {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    padding: 3rem 1.5rem;
    border-radius: 24px;
    text-align: center;
    margin-bottom: 3rem;
}

.tools-index-page .page-header h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.tools-index-page .page-header .page-intro {
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

.tools-index-page .tool-category {
    margin-bottom: 3rem;
}

.tools-index-page .tool-category h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tools-index-page .category-note {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.tools-index-page .tool-card {
    border-radius: 16px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.tools-index-page .tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), #ef4444);
    opacity: 0;
    transition: opacity 0.2s;
}

.tools-index-page .tool-card:hover::before {
    opacity: 1;
}

.tools-index-page .tool-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #fef2f2, white);
    border: 1px solid #fecaca;
    border-radius: 14px;
}

.tools-index-page .tools-info {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem;
}

/* Ad Container Styling */
.ad-container {
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
}

/* Print Improvements */
@media print {

    .tool-header,
    .sidebar-widget,
    .ad-container {
        display: none;
    }

    .tool-layout {
        display: block;
    }
}

/* Mobile Responsive Enhancements */
@media (max-width: 640px) {
    .tool-header {
        margin: -1rem -1rem 1.5rem -1rem;
        padding: 2rem 1rem;
        border-radius: 0 0 20px 20px;
    }

    .tool-header h1 {
        font-size: 1.375rem;
    }

    .solver-form {
        padding: 1.25rem;
    }

    .results-section,
    .tool-content,
    .faq-section {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .result-group {
        padding: 1rem;
    }

    .example-item {
        flex-direction: column;
        text-align: center;
    }
}