/* ==========================================================================
   PuzzleGen Pro - Vibrant Theme
   ========================================================================== */

:root {
    /* Color Palette - Colorful Professional Theme */
    --bg-main: #F8FAFC; 
    --bg-card: #FFFFFF; 
    --bg-sidebar: #0F172A; /* Solid Dark Slate */
    --border-color: #E2E8F0; 
    --text-primary: #1E293B; 
    --text-secondary: #64748B; 
    --text-muted: #94A3B8;
    
    --primary: #FF9671; 
    --primary-hover: #FFC75F;
    
    --success: #10B981; 
    --warning: #F59E0B;
    --danger: #EF4444;
    
    /* Layout & Shadows - Sharper, Enterprise Look */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.2s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px; /* Bumped base font size */
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    height: 100vh;
}

/* Standard Elements */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--primary-hover);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-sm); /* Sharper */
    font-weight: 600;
    font-size: 15px; /* Larger */
    cursor: pointer;
    transition: all 0.15s ease; /* Snappier */
    border: none;
    text-align: center;
}

h1, h2, h3, h4, .logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    z-index: 10;
}

.logo-area {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 20px;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-btn.active {
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    background: white;
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-status {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.main-header {
    height: 80px;
    background: var(--bg-card);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 5;
}

.header-title h2 {
    font-size: 22px;
    color: var(--text-primary);
}

.header-title p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.badge {
    background: var(--success);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--bg-main);
}

.tab-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Puzzle Layout */
.puzzle-layout {
    display: flex;
    gap: 24px;
    height: calc(100vh - 140px);
}

.puzzle-controls {
    width: 320px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    overflow-y: auto;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.puzzle-controls h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-primary);
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* Forms */
.control-group {
    margin-bottom: 16px;
}

.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    background: #F8FAFC;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 150, 113, 0.2);
}

textarea {
    resize: vertical;
}

.helper-text {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(255, 150, 113, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-outline:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.sidebar .btn-outline {
    color: white !important;
    border-color: rgba(255,255,255,0.3) !important;
}

.sidebar .btn-outline:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.5) !important;
    color: white !important;
}

/* Toggle Buttons (View Mode) */
.view-mode-toggle {
    display: flex;
    background: #F1F5F9;
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
}

.btn-toggle {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-toggle.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.export-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-top: 24px;
}

.export-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Preview Area */
.puzzle-preview-area {
    flex: 1;
    background: #E2E8F0;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    padding: 40px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.puzzle-page-frame {
    background: white;
    width: 612px; /* 8.5 x 11 at 72dpi standard */
    min-height: 792px;
    height: auto;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    position: relative;
    margin: auto;
}

.puzzle-header {
    text-align: center;
    margin-bottom: 32px;
}

.puzzle-header h2 {
    font-size: 28px;
    color: black;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
}

.puzzle-divider {
    display: none;
}

/* Sudoku Grid */
.puzzle-workspace-grid {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sudoku-table {
    border-collapse: collapse;
    border: 4px solid black;
    width: 450px;
    height: 450px;
    background: white;
}

.sudoku-table td {
    border: 1px solid #666;
    width: 50px;
    height: 50px;
    text-align: center;
    vertical-align: middle;
    font-size: 28px;
    font-family: 'Inter', sans-serif;
    color: black;
}

.sudoku-table td.thick-right {
    border-right: 3px solid black;
}

.sudoku-table td.thick-bottom {
    border-bottom: 3px solid black;
}

.sudoku-table td.given {
    font-weight: 700;
}

.sudoku-table td.solution {
    color: var(--primary); /* Colorful solution */
    font-weight: 600;
}

/* Word Search Grid */
.wordsearch-table {
    border-collapse: collapse;
    margin: 0 auto;
}

.wordsearch-table td {
    width: 20px;
    height: 20px;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
    font-family: monospace;
    font-weight: 600;
    color: black;
    text-transform: uppercase;
    border: 1px solid #E2E8F0;
    position: relative;
}



.word-list-area {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    column-gap: 16px;
    row-gap: 12px;
    justify-content: center;
}

.word-item {
    font-size: 13px;
    font-family: monospace;
    font-weight: 600;
    color: black;
    text-transform: uppercase;
    width: 30%;
    text-align: center;
}




/* Footer */
.puzzle-footer {
    position: absolute;
    bottom: 48px;
    left: 48px;
    right: 48px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748B;
    border-top: 1px solid #E2E8F0;
    padding-top: 12px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1E293B;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
    z-index: 1000;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Maze Grid */
.maze-table {
    border-collapse: collapse;
    margin: 0 auto;
    background: white;
}

.maze-table td {
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    background: white;
}

.maze-table td.wall-top { border-top: 2px solid black; }
.maze-table td.wall-right { border-right: 2px solid black; }
.maze-table td.wall-bottom { border-bottom: 2px solid black; }
.maze-table td.wall-left { border-left: 2px solid black; }

.maze-table td.start-cell {
    background: rgba(16, 185, 129, 0.2);
    position: relative;
}
.maze-table td.start-cell::after {
    content: 'S';
    font-size: 10px;
    font-family: sans-serif;
    font-weight: bold;
    color: #059669;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.maze-table td.end-cell {
    background: rgba(239, 68, 68, 0.2);
    position: relative;
}
.maze-table td.end-cell::after {
    content: 'E';
    font-size: 10px;
    font-family: sans-serif;
    font-weight: bold;
    color: #DC2626;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.maze-table td.solution-path {
    background: rgba(255, 150, 113, 0.4);
}

/* Cryptogram */
.crypto-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px;
    line-height: 1.5;
    align-content: flex-start;
    justify-content: flex-start;
    align-items: flex-start;
}
.crypto-word {
    display: inline-flex;
    gap: 4px;
}
.crypto-letter {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 24px;
}
.crypto-blank {
    width: 100%;
    border-bottom: 2px solid black;
    height: 24px;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
    color: var(--primary);
}
.crypto-hint {
    font-size: 14px;
    font-family: monospace;
    font-weight: bold;
}

/* Scramble */
.scramble-grid {
    align-items: flex-start;
    justify-content: flex-start;
    align-content: flex-start;
}
.scramble-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    padding: 24px;
    font-size: 20px;
    font-weight: bold;
    font-family: monospace;
}
.scramble-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.scramble-word {
    letter-spacing: 2px;
}
.scramble-line {
    flex: 1;
    border-bottom: 2px solid black;
    margin-left: 20px;
    position: relative;
}
.scramble-solution {
    position: absolute;
    bottom: 2px;
    left: 20px;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
}

/* Nonogram */
.nonogram-table {
    border-collapse: collapse;
    margin: 0 auto;
    font-family: monospace;
    font-size: 12px;
}
.nonogram-table td, .nonogram-table th {
    border: 1px solid #ccc;
    text-align: center;
    vertical-align: middle;
}
.nonogram-table th {
    background: #f8fafc;
    border: 1px solid #94a3b8;
}
.nonogram-table .nono-cell {
    width: 24px;
    height: 24px;
}
.nonogram-table .nono-filled {
    background: black;
}
.nonogram-table .nono-hint-col {
    vertical-align: bottom;
    padding-bottom: 4px;
}
.nonogram-table .nono-hint-row {
    text-align: right;
    padding-right: 4px;
}

/* Kakuro */
.kakuro-table {
    border-collapse: collapse;
    margin: 0 auto;
    background: black;
}
.kakuro-table td {
    width: 40px;
    height: 40px;
    border: 1px solid #666;
    text-align: center;
    vertical-align: middle;
    font-size: 18px;
    font-weight: bold;
}
.kakuro-table td.kakuro-empty {
    background: white;
}
.kakuro-table td.kakuro-clue {
    background: #333;
    position: relative;
    color: white;
    font-size: 11px;
}
.kakuro-table td.kakuro-clue::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom right, transparent 49%, #999 50%, transparent 51%);
}
.kakuro-down-clue {
    position: absolute;
    bottom: 2px; left: 4px;
}
.kakuro-across-clue {
    position: absolute;
    top: 2px; right: 4px;
}
.kakuro-solution {
    color: var(--primary);
}

/* Login Screen Overlay */
.login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 40px;
    overflow-y: auto;
}

.login-container {
    background: white;
    width: 100%;
    max-width: 1100px;
    min-height: 650px;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
}

/* Showcase Area */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatSlow {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.login-showcase {
    flex: 1;
    background: linear-gradient(-45deg, #020617, #1e1b4b, #0f172a, #312e81);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
    animation: floatSlow 8s ease-in-out infinite;
}
.floating-icon-1 { top: 15%; left: 10%; font-size: 64px; animation-delay: 0s; }
.floating-icon-2 { bottom: 20%; right: 15%; font-size: 96px; animation-delay: 2s; }
.floating-icon-3 { top: 40%; right: 10%; font-size: 48px; animation-delay: 4s; }
.floating-icon-4 { bottom: 15%; left: 20%; font-size: 72px; animation-delay: 1s; }

.showcase-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 40px;
}
.login-logo-img {
    height: 60px;
    width: auto;
    background: white;
    padding: 12px 24px;
    margin-bottom: 0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: none;
}
.showcase-title-block h2 {
    font-size: 32px;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 6px;
    line-height: 1.1;
    color: white;
}
.showcase-title-block p {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    margin: 0;
}

.pro-features-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.glass-card {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    transition: none;
    box-shadow: none;
}
.glass-card:hover {
    transform: none;
    box-shadow: none;
}
.glass-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}
.check-icon {
    color: #60A5FA;
    background: transparent;
    width: 20px;
    height: 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.glass-card p {
    font-size: 14px;
    margin-bottom: 0;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    padding-left: 32px;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
}
.puzzle-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 16px;
    transition: all 0.2s;
    cursor: default;
}
.puzzle-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}
.puzzle-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.puzzle-card h3 {
    font-size: 15px;
    font-weight: 600;
}

/* Forms Area */
.login-form-area {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
}

.auth-form {
    display: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    width: 100%;
    max-width: 360px;
    animation: fadeIn 0.3s ease;
}
.auth-form.active-form {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 14px;
}

.auth-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
    margin-top: -8px;
}
.auth-actions a, .auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.auth-actions a:hover, .auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* -------------------------------------
   PAYWALL MODAL & BADGES
-------------------------------------- */
.pro-badge {
    font-size: 14px;
    opacity: 0.8;
}

.paywall-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.paywall-overlay.active {
    display: flex;
}

.paywall-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 1000px;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
}

.paywall-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}
.paywall-close:hover { color: var(--text-primary); }

.paywall-header {
    text-align: center;
    margin-bottom: 40px;
}
.paywall-header h2 {
    font-size: 32px;
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    margin-bottom: 12px;
}
.paywall-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

.pricing-tiers {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

.pricing-card {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    background: #FFF5F1;
    border: 2px solid var(--primary);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 150, 113, 0.15);
    z-index: 2;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.pricing-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.price {
    margin-bottom: 24px;
}
.price .currency { font-size: 20px; vertical-align: top; font-weight: 600; color: var(--text-secondary); }
.price .amount { font-size: 42px; font-weight: 700; font-family: 'Outfit', sans-serif; color: var(--text-primary); line-height: 1; }
.price .period { font-size: 16px; color: var(--text-secondary); }

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    flex-grow: 1;
}
.pricing-features li {
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .pricing-tiers { flex-direction: column; }
    .pricing-card.popular { transform: scale(1); }
}

/* Killer Sudoku & Calcudoku Grid */
.killer-sudoku-table {
    border-collapse: collapse;
    border: 4px solid black;
    background: white;
    margin: 0 auto;
}
.killer-sudoku-table td {
    border: 1px solid #ccc;
    width: 50px;
    height: 50px;
    text-align: center;
    vertical-align: middle;
    font-size: 24px;
    font-family: 'Inter', sans-serif;
    color: black;
    position: relative;
}
.calcudoku-table td {
    border: 1px dashed #ccc;
}
/* Cages */
.killer-sudoku-table td.cage-top { border-top: 2px dashed #333; }
.killer-sudoku-table td.cage-bottom { border-bottom: 2px dashed #333; }
.killer-sudoku-table td.cage-left { border-left: 2px dashed #333; }
.killer-sudoku-table td.cage-right { border-right: 2px dashed #333; }
/* Calcudoku uses solid cages typically, but dashed is ok or bold solid */
.calcudoku-table td.cage-top { border-top: 3px solid #333; }
.calcudoku-table td.cage-bottom { border-bottom: 3px solid #333; }
.calcudoku-table td.cage-left { border-left: 3px solid #333; }
.calcudoku-table td.cage-right { border-right: 3px solid #333; }

.killer-clue {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

