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

/* Color Scheme CSS Variables */
:root {
    /* Default Theme: Ocean Vibes - Dreamy coastal with soft teals and coral */
    --theme-primary: #0EA5E9;
    --theme-primary-dark: #0284C7;
    --theme-secondary: #06B6D4;
    --theme-accent: #FB7185;
    --theme-cell-bg: #F0FDFA;
    --theme-cell-border: #5EEAD4;
    --theme-selected-bg: linear-gradient(135deg, #06B6D4 0%, #0EA5E9 50%, #3B82F6 100%);
    --theme-selected-bg-solid: #0EA5E9;
    --theme-selected-text: #ffffff;
    --theme-selected-border: #0284C7;
    --theme-cell-text: #0F766E;
}

/* Theme: Sunset Vibes - Golden hour with peach, coral, and soft lavender */
[data-theme="sunset"] {
    --theme-primary: #F97316;
    --theme-primary-dark: #EA580C;
    --theme-secondary: #FB923C;
    --theme-accent: #FBBF24;
    --theme-cell-bg: #FFF7ED;
    --theme-cell-border: #FDBA74;
    --theme-selected-bg: linear-gradient(135deg, #F472B6 0%, #FB923C 50%, #FBBF24 100%);
    --theme-selected-bg-solid: #FB923C;
    --theme-selected-text: #ffffff;
    --theme-selected-border: #EA580C;
    --theme-cell-text: #9A3412;
}

/* Theme: Forest Vibes - Lush botanical with sage and warm earth */
[data-theme="forest"] {
    --theme-primary: #22C55E;
    --theme-primary-dark: #16A34A;
    --theme-secondary: #4ADE80;
    --theme-accent: #FCD34D;
    --theme-cell-bg: #F0FDF4;
    --theme-cell-border: #86EFAC;
    --theme-selected-bg: linear-gradient(135deg, #34D399 0%, #22C55E 50%, #16A34A 100%);
    --theme-selected-bg-solid: #22C55E;
    --theme-selected-text: #ffffff;
    --theme-selected-border: #16A34A;
    --theme-cell-text: #166534;
}

/* Theme: Candy Vibes - Cotton candy with soft pink, lavender, and mint */
[data-theme="candy"] {
    --theme-primary: #A855F7;
    --theme-primary-dark: #9333EA;
    --theme-secondary: #C084FC;
    --theme-accent: #2DD4BF;
    --theme-cell-bg: #FAF5FF;
    --theme-cell-border: #D8B4FE;
    --theme-selected-bg: linear-gradient(135deg, #F472B6 0%, #A855F7 50%, #818CF8 100%);
    --theme-selected-bg-solid: #A855F7;
    --theme-selected-text: #ffffff;
    --theme-selected-border: #9333EA;
    --theme-cell-text: #7E22CE;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #06B6D4 0%, #0EA5E9 50%, #3B82F6 100%);
    color: white;
    padding: 0.25rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar .logo-img {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.nav-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.nav-card-title {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.permalink-hidden {
    position: absolute;
    left: -9999px;
}

.card-slug.btn-permalink {
    color: #0EA5E9;
    display: inline;
}

.btn-permalink {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.2s;
}

.btn-permalink:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-permalink svg {
    display: block;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.25rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #06B6D4 0%, #0EA5E9 50%, #3B82F6 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0891B2 0%, #0284C7 50%, #2563EB 100%);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-link {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
}

.btn-link:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: white;
    margin: 2rem 0;
    border-radius: 8px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.hero p {
    font-size: 1.25rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.feature h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Auth Forms */
.auth-form {
    max-width: 400px;
    margin: 4rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-form h1 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #0EA5E9;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: #0EA5E9;
    text-decoration: none;
}

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

/* Flash Messages */
.flash-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.flash-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.flash-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}

.flash-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.auth-description {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Dashboard */
.dashboard {
    margin: 2rem 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: #2c3e50;
}

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

.card-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.card-permalink {
    color: #7f8c8d;
    font-size: 0.9rem;
    padding-left: 0.5rem;
}

.card-slug {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card-date {
    color: #95a5a6;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.card-actions .delete-form {
    display: inline;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 8px;
}

.empty-state p {
    margin-bottom: 1.5rem;
    color: #7f8c8d;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #0EA5E9;
}

/* Textarea for cell input */
.form-group textarea,
.edit-container textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 200px;
    line-height: 1.6;
}

.form-group textarea:focus,
.edit-container textarea:focus {
    outline: none;
    border-color: #0EA5E9;
}

/* Cell validation messages */
.cell-validation {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

.cell-validation.error {
    color: #e74c3c;
}

.cell-validation.success {
    color: #27ae60;
}

/* Cell count hint */
#cell-count-hint {
    font-weight: normal;
    font-size: 0.875rem;
    color: #7f8c8d;
}

/* Edit container for bingo card view */
.edit-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem auto 2rem;
    max-width: min(600px, 95vw);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.edit-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

/* Bingo Grid */
.bingo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 0.8rem auto 2rem auto;
    max-width: min(600px, 95vw);
    padding: 0 10px;
}

/* Grid size variants */
.bingo-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: min(400px, 95vw);
}

.bingo-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
    max-width: min(500px, 95vw);
}

.bingo-grid.grid-5 {
    grid-template-columns: repeat(5, 1fr);
    max-width: min(600px, 95vw);
}

.bingo-cell {
    aspect-ratio: 1;
    border: 3px solid var(--theme-cell-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--theme-cell-bg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bingo-cell.editable {
    padding: 0.5rem;
}

.bingo-cell:hover {
    border-color: var(--theme-primary);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bingo-cell.selected {
    background: var(--theme-selected-bg);
    color: var(--theme-selected-text);
    border-color: var(--theme-selected-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bingo-cell.selected:hover {
    background-color: var(--theme-primary-dark);
}

/* View-only mode for non-owners */
.bingo-grid.view-only .bingo-cell {
    cursor: default;
}

.bingo-grid.view-only .bingo-cell:hover {
    border-color: var(--theme-cell-border);
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bingo-grid.view-only .bingo-cell.selected:hover {
    border-color: var(--theme-selected-border);
    background-color: var(--theme-selected-bg);
}

.bingo-cell .cell-text {
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    color: var(--theme-cell-text);
    font-weight: 500;
    line-height: 1.2;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bingo-cell.selected .cell-text {
    color: var(--theme-selected-text);
}

/* Center cell (free space) - reversed colors */
.bingo-cell.center-cell,
.bingo-cell.free-space {
    background: var(--theme-primary);
    border-color: var(--theme-primary-dark);
}

.bingo-cell.center-cell .cell-text,
.bingo-cell.free-space .cell-text {
    color: var(--theme-selected-text);
}

.bingo-cell.center-cell:hover,
.bingo-cell.free-space:hover {
    background: var(--theme-primary-dark);
    border-color: var(--theme-primary);
}

.bingo-cell.center-cell.selected,
.bingo-cell.free-space.selected {
    background: var(--theme-cell-bg);
    border-color: var(--theme-cell-border);
    padding: 0;
}

.bingo-cell.center-cell.selected .cell-text,
.bingo-cell.free-space.selected .cell-text {
    color: var(--theme-cell-text);
}

/* Free space logo */
.free-space-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Free space input styling in creation form */
input.bingo-cell.free-space {
    background: var(--theme-primary);
    color: var(--theme-selected-text);
    border-color: var(--theme-primary-dark);
    cursor: not-allowed;
}

input.bingo-cell.free-space::placeholder {
    color: var(--theme-selected-text);
    opacity: 0.8;
}

.bingo-cell .cell-input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: transparent;
    color: var(--theme-cell-text);
}

.bingo-cell .cell-input:focus {
    outline: none;
}

/* Create Card */
.create-card {
    margin: 2rem 0;
}

.create-card h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
}

/* Theme Preview Section */
.theme-preview-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.theme-preview-section label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #2c3e50;
}

.theme-preview-grid {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-cell {
    width: 90px;
    height: 90px;
    border: 3px solid var(--theme-cell-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--theme-cell-bg);
    color: var(--theme-cell-text);
    font-weight: 500;
    font-size: 0.85rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.preview-cell.selected {
    background: var(--theme-selected-bg);
    color: var(--theme-selected-text);
    border-color: var(--theme-selected-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.preview-cell.free-space {
    background: var(--theme-primary);
    border-color: var(--theme-primary-dark);
    color: var(--theme-selected-text);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Bingo Card View */
.bingo-card-view {
    margin: 2rem 0;
}

.card-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.edit-controls {
    display: flex;
    gap: 0.5rem;
}

.card-header.card-header-compact {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.card-title-small {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
}

.card-header h1 {
    color: #2c3e50;
    text-align: center;
}

/* Permalink Section */
.permalink-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.permalink-input {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #7f8c8d;
    background: #f9f9f9;
}

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.card-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.permalink {
    color: #7f8c8d;
}

.permalink code {
    background: #f5f5f5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Auto-refresh Section */
.auto-refresh-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
}

.auto-refresh-section label {
    font-weight: 500;
    color: #2c3e50;
}

.auto-refresh-section select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.auto-refresh-section select:focus {
    outline: none;
    border-color: #0EA5E9;
}

.refresh-countdown {
    color: #7f8c8d;
    font-size: 0.9rem;
    min-width: 50px;
}

/* Share Section */
.share-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.share-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.share-link {
    display: flex;
    gap: 1rem;
}

.share-link input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.top-card-highlight {
    display: flex;
    justify-content: center;
}

.card-item.featured {
    max-width: 400px;
    width: 100%;
    border: 2px solid #f39c12;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Theme Selector */
.theme-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.theme-selector label {
    font-weight: 500;
    color: #2c3e50;
}

.theme-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--theme-primary);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    color: var(--theme-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.theme-selector select:hover {
    background: var(--theme-cell-bg);
}

.theme-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--theme-accent);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .bingo-grid {
        gap: 4px;
        padding: 0 5px;
    }

    .bingo-grid.grid-3 {
        max-width: min(350px, 95vw);
    }

    .bingo-grid.grid-4 {
        max-width: min(400px, 95vw);
    }

    .bingo-grid.grid-5 {
        max-width: min(500px, 95vw);
    }

    .bingo-cell {
        border-radius: 8px;
        border-width: 2px;
        padding: 4px;
    }

    .card-header {
        padding: 1rem;
    }

    .card-header h1 {
        font-size: 1.5rem;
    }

    .card-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .card-info .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .auto-refresh-section,
    .theme-selector {
        flex-wrap: wrap;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .share-section {
        padding: 1rem;
    }

    .share-link {
        flex-direction: column;
    }

    .share-link input {
        font-size: 0.85rem;
    }

    .theme-preview-section {
        padding: 0.75rem;
    }

    .preview-cell {
        width: 75px;
        height: 75px;
        font-size: 0.75rem;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .navbar .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-left {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .nav-card-title {
        max-width: 150px;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .bingo-grid {
        gap: 3px;
    }

    .bingo-cell {
        border-radius: 6px;
        padding: 3px;
    }

    .card-header h1 {
        font-size: 1.25rem;
    }
}

/* Checkbox Styling */
.form-group-checkbox {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.2rem;
    cursor: pointer;
    accent-color: #0EA5E9;
}

.checkbox-label span {
    color: #2c3e50;
    font-size: 0.9rem;
}

.checkbox-label a {
    color: #0EA5E9;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Legal Pages (TOS, Privacy, etc.) */
.legal-page {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.legal-page h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.legal-page .last-updated {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-page section {
    margin-bottom: 2rem;
}

.legal-page h2 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.legal-page p {
    color: #555;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.legal-page ul {
    color: #555;
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-page li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Site Footer */
.site-footer {
    text-align: center;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}

.site-footer a {
    text-decoration: none;
    color: #0EA5E9;
}

.site-footer span {
    font-size: 0.7rem;
    color: #aaa;
    font-style: italic;
}

/* 404 Error Page */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.error-bingo-card {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.error-cell {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #06B6D4 0%, #0EA5E9 50%, #3B82F6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.error-page h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.error-subtitle {
    font-size: 1.25rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.error-path {
    color: #95a5a6;
    margin-bottom: 1.5rem;
}

.error-path code {
    background: #f5f5f5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.error-jokes {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-jokes p {
    color: #7f8c8d;
    font-style: italic;
    margin: 0;
}

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

/* Dashboard Permalink Button */
.btn-permalink-dashboard {
    background: none;
    border: none;
    padding: 0.15rem 0.3rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0EA5E9;
    transition: color 0.2s;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.btn-permalink-dashboard:hover {
    color: #0284C7;
}

.btn-permalink-dashboard svg {
    display: block;
}

.card-slug .slug-text {
    vertical-align: middle;
}

/* Relative Time Tooltip */
.relative-time {
    cursor: help;
    position: relative;
    border-bottom: 1px dotted #95a5a6;
}

.relative-time:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
}

.relative-time:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
    z-index: 10;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: #2c3e50;
    background: white;
    border: 1px solid #ddd;
    transition: all 0.2s;
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled):not(.pagination-current) {
    background: #f5f5f5;
    border-color: #0EA5E9;
    color: #0EA5E9;
}

.pagination-btn.pagination-current {
    background: linear-gradient(135deg, #06B6D4 0%, #0EA5E9 50%, #3B82F6 100%);
    color: white;
    border-color: transparent;
    cursor: default;
}

.pagination-btn.disabled {
    color: #aaa;
    cursor: not-allowed;
    background: #f9f9f9;
}

.pagination-ellipsis {
    padding: 0 0.25rem;
    color: #7f8c8d;
}

.pagination-prev,
.pagination-next {
    min-width: auto;
}

@media (max-width: 480px) {
    .pagination {
        gap: 0.25rem;
    }

    .pagination-btn {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }

    .pagination-prev,
    .pagination-next {
        font-size: 0;
    }

    .pagination-prev::before {
        content: '\2190';
        font-size: 0.9rem;
    }

    .pagination-next::after {
        content: '\2192';
        font-size: 0.9rem;
    }
}
