/* MindfulMe - Complete CSS Styles */

:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --background: #0f172a;
    --surface: #1e293b;
    --card-bg: rgba(30, 41, 59, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Hero Section */
.hero-section {
    padding-top: 100px;
    min-height: 100vh;
}

.animated-gradient-title {
    font-size: 3.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Stats Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    border-color: var(--primary);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 0.1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.bounce-animation {
    animation: bounce 2s ease-in-out infinite;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.rotate-animation {
    animation: rotate 4s linear infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

/* Quick Actions */
.quick-actions {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Mood Tracker */
.mood-tracker, .breathing-exercise, .journal, .insights, .resources, .puzzle-feature {
    padding-top: 100px;
    min-height: 100vh;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.mood-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.mood-options {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.mood-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 100px;
}

.mood-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.mood-btn.selected {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

.mood-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
    filter: grayscale(20%);
    transition: all 0.3s ease;
}

.mood-btn:hover .mood-emoji,
.mood-btn.selected .mood-emoji {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.mood-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.mood-factors {
    margin-top: 2rem;
}

.factor-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.factor-chip {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.factor-chip:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.2);
}

.factor-chip.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

.mood-note {
    margin-top: 1.5rem;
}

.mood-note textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s ease;
}

.mood-note textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.7);
}

/* Breathing Exercise */
.breathing-techniques {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.technique-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.technique-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary), transparent);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
}

.technique-card:hover::before {
    width: 300px;
    height: 300px;
    opacity: 0.3;
}

.technique-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.technique-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.technique-timing {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--primary);
    display: inline-block;
    margin-top: 1rem;
}

#breathingContainer {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    margin: 2rem auto;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.breathing-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
}

.breathing-stat {
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.breathing-visual {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.breathing-circle {
    width: 200px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(99, 102, 241, 0.2);
    stroke-width: 8;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.breathing-inner {
    text-align: center;
    z-index: 1;
}

.breathing-text {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.breathing-counter {
    font-size: 3rem;
    color: var(--accent);
}

.breathing-circle.breathing-in {
    animation: breatheIn 4s ease-in-out;
}

.breathing-circle.breathing-out {
    animation: breatheOut 4s ease-in-out;
}

@keyframes breatheIn {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

@keyframes breatheOut {
    from { transform: scale(1.2); }
    to { transform: scale(1); }
}

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

/* Journal */
.journal-prompt {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.1rem;
    font-style: italic;
}

.journal-editor {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

#journalContent {
    width: 100%;
    min-height: 400px;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s ease;
}

#journalContent:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.7);
}

.journal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.word-count {
    color: var(--text-secondary);
}

.journal-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-chip {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-chip:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.selected-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.selected-tag {
    background: var(--primary);
    color: white;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-tag span {
    cursor: pointer;
}

.recent-entries {
    margin-top: 3rem;
}

.recent-entries h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.recent-entry {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.recent-entry:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.entry-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.entry-preview {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.entry-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.entry-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Insights */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.insight-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
}

.insight-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.insight-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 1rem 0;
}

.mood-chart-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

#moodChart {
    max-height: 300px;
}

.no-data-message {
    text-align: center;
    padding: 4rem 2rem;
}

.no-data-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

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

.resource-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.resource-card.emergency {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.resource-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.resource-list {
    list-style: none;
    padding: 0;
}

.resource-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

/* Achievements */
.achievements-section {
    margin: 3rem auto;
    max-width: 1000px;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.achievements-section h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.achievement-badge {
    text-align: center;
    padding: 1rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.achievement-badge.unlocked {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid var(--primary);
}

.achievement-badge.locked {
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid rgba(99, 102, 241, 0.1);
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.achievement-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.achievement-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(400px);
    transition: transform 0.5s ease;
    z-index: 1001;
    max-width: 350px;
}

.achievement-notification.show {
    transform: translateX(0);
}

/* Puzzle Feature */
.puzzle-selection {
    margin: 2rem 0;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.puzzle-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.puzzle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.puzzle-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.puzzle-difficulty {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.puzzle-difficulty.easy {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.puzzle-difficulty.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.puzzle-difficulty.hard {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.puzzle-game {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

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

.puzzle-stats {
    display: flex;
    gap: 2rem;
}

/* Word Search Grid - WORKS AS SHOWN */
.word-search-grid {
    display: grid !important;
    grid-template-columns: repeat(10, 40px) !important;
    grid-template-rows: repeat(10, 40px) !important;
    gap: 2px;
    margin: 2rem auto;
    width: fit-content;
}

.grid-cell {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.grid-cell:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.grid-cell.selecting {
    background: rgba(99, 102, 241, 0.4);
    border-color: var(--primary);
}

.grid-cell.found {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
}

.word-list {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.word-item {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.word-item.found {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
    text-decoration: line-through;
}

/* FIXED Crossword styles */
.crossword-container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.crossword-grid-wrapper {
    position: relative;
}

.crossword-grid {
    display: grid !important;
    grid-template-columns: repeat(10, 35px) !important;
    grid-template-rows: repeat(8, 35px) !important;
    gap: 0 !important;
    background: #333;
    padding: 1px;
    border-radius: 4px;
}

/* Handle both direct inputs and divs with inputs */
.crossword-grid > input.crossword-cell,
.crossword-grid > div {
    width: 35px !important;
    height: 35px !important;
}

.crossword-grid > div > input.crossword-cell {
    width: 100% !important;
    height: 100% !important;
}

.crossword-cell {
    border: 1px solid #555 !important;
    background: rgba(30, 41, 59, 0.9) !important;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    padding: 0;
    position: relative;
}

.crossword-cell:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    background: rgba(99, 102, 241, 0.2) !important;
}

.crossword-cell.black {
    background: #1a1a1a !important;
    pointer-events: none;
}

.crossword-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: bold;
    line-height: 1;
}

.crossword-clues {
    max-width: 300px;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
}

.crossword-clues h4 {
    color: var(--primary);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.clue {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.clue-number {
    font-weight: bold;
    color: var(--primary);
}

/* FIXED Sudoku styles */
.sudoku-grid {
    display: grid !important;
    grid-template-columns: repeat(9, 40px) !important;
    grid-template-rows: repeat(9, 40px) !important;
    gap: 0 !important;
    margin: 2rem auto;
    width: fit-content;
    background: #333;
    padding: 2px;
    border-radius: 8px;
    position: relative;
}

/* Force all sudoku cells to be in grid */
.sudoku-grid > input.sudoku-cell {
    width: 40px !important;
    height: 40px !important;
}

/* Thick borders for 3x3 sections */
.sudoku-grid::before,
.sudoku-grid::after {
    content: '';
    position: absolute;
    background: #666;
    z-index: 10;
}

.sudoku-grid::before {
    width: 2px;
    height: 100%;
    left: 33.33%;
    top: 0;
}

.sudoku-grid::after {
    width: 2px;
    height: 100%;
    left: 66.66%;
    top: 0;
}

.sudoku-row-divider {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #666;
    left: 0;
    z-index: 10;
}

.sudoku-row-divider.row-3 {
    top: 33.33%;
}

.sudoku-row-divider.row-6 {
    top: 66.66%;
}

.sudoku-cell {
    border: 1px solid #444 !important;
    background: rgba(30, 41, 59, 0.9) !important;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
    padding: 0;
    transition: all 0.2s ease;
}

.sudoku-cell:focus {
    outline: none;
    background: rgba(99, 102, 241, 0.3) !important;
    border-color: var(--primary) !important;
    transform: scale(1.05);
    z-index: 1;
}

.sudoku-cell.fixed {
    background: rgba(99, 102, 241, 0.15) !important;
    color: var(--primary);
    font-weight: bold;
}

.sudoku-cell.error {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444;
}

.sudoku-cell:hover:not(.fixed) {
    background: rgba(99, 102, 241, 0.2) !important;
}

/* Number input styling */
.sudoku-cell::-webkit-inner-spin-button,
.sudoku-cell::-webkit-outer-spin-button,
.crossword-cell::-webkit-inner-spin-button,
.crossword-cell::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sudoku-cell[type=number],
.crossword-cell[type=text] {
    -moz-appearance: textfield;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
    }
    
    .animated-gradient-title {
        font-size: 2.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .mood-options {
        flex-direction: column;
    }
    
    .mood-btn {
        width: 100%;
    }
    
    .breathing-techniques {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }
    
    .achievement-badge {
        padding: 0.5rem;
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .achievement-name {
        font-size: 0.8rem;
    }
    
    .achievement-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .word-search-grid {
        grid-template-columns: repeat(10, 30px) !important;
        grid-template-rows: repeat(10, 30px) !important;
    }
    
    .grid-cell {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem;
    }
    
    .crossword-grid {
        grid-template-columns: repeat(10, 30px) !important;
        grid-template-rows: repeat(8, 30px) !important;
    }
    
    .crossword-cell {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem;
    }
    
    .sudoku-grid {
        grid-template-columns: repeat(9, 35px) !important;
        grid-template-rows: repeat(9, 35px) !important;
    }
    
    .sudoku-cell {
        width: 35px !important;
        height: 35px !important;
        font-size: 1.1rem;
    }
    
    .crossword-container {
        flex-direction: column;
        align-items: center;
    }
}

/* Milestone popup */
.milestone-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.6);
    z-index: 1002;
    transition: all 0.3s ease;
}

.milestone-popup.show {
    transform: translate(-50%, -50%) scale(1);
}

.milestone-content {
    text-align: center;
}

.milestone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.milestone-text {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Breathing progress bar */
.breathing-progress {
    width: 100%;
    height: 10px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 5px;
    margin-top: 2rem;
    overflow: hidden;
}

.breathing-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
    transition: width 0.1s linear;
}

/* Puzzle complete screen */
.puzzle-complete {
    text-align: center;
    padding: 3rem;
}

.puzzle-complete h2 {
    color: var(--primary);
    margin-bottom: 2rem;
}

.complete-stats {
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.complete-stats div {
    font-size: 1.2rem;
}

/* Factor list in insights */
.factor-list {
    text-align: left;
    margin-top: 1rem;
}

.factor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.factor-count {
    background: rgba(99, 102, 241, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

/* Theme cloud in insights */
.theme-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.theme-tag {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.theme-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

/* Summary stats */
.summary-stats {
    text-align: left;
    margin-top: 1rem;
}

.summary-stats div {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

/* Insight trend */
.insight-trend {
    margin-top: 0.5rem;
    font-size: 1.2rem;
}

.insight-trend.positive {
    color: var(--success);
}

.insight-trend.negative {
    color: var(--error);
}

/* Current mood display */
.current-mood {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Feature stats */
.feature-stats {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Feature badge */
.feature-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Book list */
.book-list {
    list-style: none;
    padding: 0;
}

.book-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

/* Mood check time */
.mood-check-time {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Save button states */
.save-mood-btn,
.save-journal-btn {
    margin-top: 2rem;
    width: 100%;
    justify-content: center;
}

/* No entries message */
.no-entries {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 15px;
}

/* Animated title */
.animated-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

/* End of styles.css */
