:root {
    --bg-color: #e0e0e0;
    --card-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #000000;
    --accent-color: #000000;
    --border-color: #000000;
    --border-width: 3px;
    --shadow-offset: 4px;
    --font-family: 'Space Mono', monospace;
    --transition-speed: 0.2s;

    /* Tag Colors (Monochrome/High Contrast) */
    --tag-work: #000000;
    --tag-personal: #000000;
    --tag-study: #000000;
    --tag-fitness: #000000;
    --tag-urgent: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: radial-gradient(#000 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    overflow-y: auto;
    position: relative;
    padding-top: 0;
}




/* Layout Wrapper for Slide Effect */
.layout-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 900px;
    perspective: 1000px;
    margin: 2rem 0;
    /* Add space around the app */
    flex-grow: 1;
    /* Allow it to take up available space */
    align-items: center;
    /* Vertically center the app in the wrapper area if feasible */
}


/* Layout Utilities */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Site Header */
.site-header {
    width: 100%;
    background: #fff;
    border-bottom: 4px solid #000;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: 'Press Start 2P', cursive;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Allow wrapping */
}

.logo {
    font-size: 1.5rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 #000;
    object-fit: contain;
}

.header-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 #000;
    transition: all 0.2s ease;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    cursor: pointer;
}

.nav-link:hover {
    background: #ffbd2e;
    /* RexaAge accent color */
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #000;
}

.nav-link:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.65rem;
        padding: 0.4rem 0.6rem;
    }

    .app-container {
        width: 95%;
        padding: 1.5rem 1rem;
        max-width: 100%;
    }

    .layout-wrapper {
        margin: 1rem 0;
    }
}

.site-footer {
    width: 100%;
    background: black;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    border-top: 4px solid black;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    border: none;
}

.footer-link:hover {
    color: #aeaeae;
    border: none;
}

.footer-copyright {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* App Container */
.app-container {
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--border-color);
    border-radius: 0;
    padding: 2.2rem 1.5rem 1.5rem;
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 90vh;
    position: relative;
    z-index: 10;
}

/* Window Header Simulation */
.app-container::before {
    content: '';
    display: block;
    height: 24px;
    width: 100%;
    background: var(--border-color);
    position: absolute;
    top: 0;
    left: 0;
    border-bottom: var(--border-width) solid var(--border-color);
}

.app-container::after {
    content: 'ooo';
    color: white;
    font-size: 20px;
    line-height: 12px;
    letter-spacing: 2px;
    position: absolute;
    top: 4px;
    left: 10px;
    font-family: sans-serif;
    font-weight: bold;
}

/* Header & Stats */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    margin-top: 0.2rem;
    /* Space for window header */
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

.level-badge {
    background: var(--text-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border: 2px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.2);
}

.xp-container {
    flex-grow: 1;
    max-width: 150px;
}

.xp-bar-bg {
    background: white;
    height: 12px;
    border: 2px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 4px;
}

.xp-bar-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: 0;
    transition: width 0.5s ease;
}

.xp-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: bold;
}

.header-actions .icon-btn {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    box-shadow: 2px 2px 0px 0px var(--border-color);
}

.header-actions .icon-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px 0px var(--border-color);
}

.header-actions .icon-btn:active {
    transform: translate(0, 0);
    box-shadow: 0px 0px 0px 0px var(--border-color);
}

.greeting-section {
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -1px;
    outline: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.app-title:focus {
    border-bottom-color: var(--text-primary);
}

.edit-icon {
    color: var(--text-secondary);
    opacity: 0.5;
    cursor: text;
}

.title-row:hover .edit-icon {
    opacity: 1;
    color: var(--text-primary);
}

.date-display {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Input Group */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

#taskInput {
    width: 100%;
    padding: 1rem;
    border-radius: 0;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    box-shadow: 4px 4px 0px 0px var(--border-color);
    transition: var(--transition-speed);
}

#taskInput:focus {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px var(--border-color);
}

#addTaskBtn {
    position: static;
    /* Reset absolute positioning */
    background: var(--text-primary);
    border: 2px solid var(--border-color);
    width: 50px;
    height: 50px;
    border-radius: 0;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
    box-shadow: 4px 4px 0px 0px var(--border-color);
}

#addTaskBtn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px var(--border-color);
}

#addTaskBtn:active {
    transform: translate(0, 0);
    box-shadow: 0px 0px 0px 0px var(--border-color);
}

.task-list {
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--text-primary) transparent;
}

.task-list::-webkit-scrollbar {
    width: 8px;
}

.task-list::-webkit-scrollbar-thumb {
    background-color: var(--text-primary);
    border: 2px solid white;
}

.task-item {
    background: white;
    margin-bottom: 0.8rem;
    padding: 1rem;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: 2px solid var(--border-color);
    box-shadow: 3px 3px 0px 0px var(--border-color);
}

.task-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.task-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px 0px var(--border-color);
}

.task-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: white;
}

.task-checkbox:checked {
    background: var(--text-primary);
}

.task-checkbox:checked::after {
    content: 'X';
    position: absolute;
    color: white;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.task-content {
    flex-grow: 1;
}

.task-text {
    font-size: 1rem;
    transition: all 0.2s ease;
    word-break: normal;
    overflow-wrap: anywhere;
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Tags & Badges */
.task-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 0;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    background: white;
    color: black;
}

.tag.urgent {
    background: black;
    color: white;
}

.delete-btn {
    background: transparent;
    border: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 1;
    /* Always visible in retro mode */
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 0;
}

.delete-btn:hover {
    color: red;
    border: 2px solid red;
    background: rgba(255, 0, 0, 0.1);
}

/* Subtasks */
.subtask-list {
    margin-top: 0.8rem;
    padding-left: 1.5rem;
    list-style: none;
    position: relative;
}

/* The vertical line connecting all subtasks */
.subtask-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 20px;
    /* Stop before the last item's curve */
    left: 0.5rem;
    width: 2px;
    background: var(--border-color);
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.5rem;
    background: white;
    border: 2px solid var(--border-color);
    box-shadow: 2px 2px 0px 0px var(--border-color);
    position: relative;
    margin-left: 1rem;
    /* Space for the connector */
    transition: all 0.2s ease;
}

/* The horizontal connector line for each item */
.subtask-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -1.2rem;
    /* Reach back to the vertical line */
    width: 1rem;
    height: 2px;
    background: var(--border-color);
}

.subtask-item:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px var(--border-color);
}

.subtask-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 0;
    appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    background: white;
    transition: all 0.2s ease;
    position: relative;
}

.subtask-checkbox:checked {
    background: var(--text-primary);
}

.subtask-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.subtask-text {
    flex-grow: 1;
    transition: all 0.2s ease;
}

.subtask-text.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.delete-subtask-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.delete-subtask-btn:hover {
    opacity: 1;
    color: red;
    transform: scale(1.2);
}

.subtask-actions {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

/* Connector for the add button */
.subtask-actions::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0.5rem;
    width: 2px;
    height: 24px;
    background: var(--border-color);
}

.subtask-actions::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 0.5rem;
    width: 1rem;
    height: 2px;
    background: var(--border-color);
}

.add-subtask-btn {
    background: var(--text-primary);
    border: 2px solid var(--border-color);
    color: white;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0px 0px var(--border-color);
    font-family: var(--font-family);
    text-transform: uppercase;
    margin-left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.add-subtask-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px var(--border-color);
    background: white;
    color: var(--text-primary);
}

.add-subtask-btn:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0px 0px var(--border-color);
}

/* Footer */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    font-weight: bold;
}

.clear-btn {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-family);
    padding: 4px 8px;
    box-shadow: 2px 2px 0px 0px var(--border-color);
    transition: all 0.2s;
}

.clear-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px var(--border-color);
}

/* Focus Mode Overlay */
.focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    background-image: radial-gradient(#000 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.focus-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.focus-content {
    text-align: center;
    color: black;
    background: white;
    padding: 3rem;
    border: 4px solid black;
    box-shadow: 10px 10px 0px 0px black;
}

.focus-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-transform: uppercase;
}

.timer-display {
    font-size: 6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-bottom: 2rem;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

.focus-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.focus-btn {
    padding: 1rem 2rem;
    border-radius: 0;
    border: 3px solid black;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 4px 4px 0px 0px black;
}

/* Footer Social Icons */
.footer-social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.social-icon {
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none !important;
}

.social-icon:hover {
    opacity: 1;
    transform: translateY(-3px);
    color: #ffbe00 !important;
    /* Yellow hover with !important to override defaults */
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.social-icon::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    /* Slightly higher */
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    font-family: sans-serif;
    white-space: nowrap;
    border: 1px solid #444;
    z-index: 9999;
    /* Higher z-index */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    visibility: hidden;
    display: block;
    /* Force block */
}

.social-icon:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
    /* Lift animation */
}

.social-icon {
    position: relative;
    overflow: visible;
    /* Ensure tooltip isn't clipped */
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.focus-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px black;
}

.focus-btn.primary {
    background: black;
    color: white;
}

.focus-btn.secondary {
    background: white;
    color: black;
}

.focus-quote {
    color: var(--text-secondary);
    font-style: italic;
    max-width: 300px;
    margin: 0 auto;
    border-top: 1px solid black;
    padding-top: 1rem;
}

/* =========================================
   About This Tool Section
   ========================================= */
.info-section {
    max-width: 900px;
    /* Matched to app container max-width */
    width: 95%;
    margin: 4rem 0;
    /* Vertical spacing */
    background: #fff;
    padding: 2rem;
    border: 4px solid #000;
    box-shadow: 12px 12px 0 #000;
    position: relative;
    z-index: 10;
    font-family: 'Press Start 2P', cursive;
}

.info-section h2 {
    margin-bottom: 2rem;
    font-size: 1.25rem;
    border-bottom: 3px solid #000;
    padding-bottom: 0.75rem;
    text-align: center;
    width: 100%;
    background: transparent;
    text-transform: uppercase;
    color: black;
}

.intro-text {
    font-family: 'Space Mono', monospace;
    /* Keep body text readable */
    font-size: 1rem;
    line-height: 1.6;
    margin: 1.5rem 0 3rem 0;
    text-align: center;
    color: black;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    /* Responsive grid */
    gap: 2rem;
    margin-top: 2rem;
}

.info-box {
    background: #fff;
    border: 3px solid #000;
    padding: 1.5rem;
    box-shadow: 6px 6px 0 #000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-box:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #000;
}

.info-box h3 {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: #000;
    border-bottom: 2px solid #ccc;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1.4;
}

.info-box p {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    color: #444;
    font-weight: bold;
}

.info-box ul {
    list-style: square;
    /* Retro vibe */
    padding-left: 1.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-box ul li {
    margin-bottom: 0.5rem;
    color: #444;
}

.info-box ul li strong {
    color: #000;
    font-weight: bold;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-section {
        padding: 1rem;
        box-shadow: 8px 8px 0 #000;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .app-container {
        width: 95%;
        padding: 1.5rem;
    }

    .timer-display {
        font-size: 4rem;
    }
}

/* Tabs */
.tab-switcher {
    display: flex;
    background: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
    gap: 10px;
}

.tab-btn {
    flex: 1;
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.6rem;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-weight: 700;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0px 0px var(--border-color);
}

.tab-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px 0px var(--border-color);
}

.tab-btn.active {
    background: var(--text-primary);
    color: white;
    box-shadow: 1px 1px 0px 0px var(--border-color);
    transform: translate(2px, 2px);
}

/* Habit Item */
.habit-item {
    background: white;
    margin-bottom: 0.8rem;
    padding: 1rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    border: 2px solid var(--border-color);
    box-shadow: 3px 3px 0px 0px var(--border-color);
}

.habit-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px 0px var(--border-color);
}

.streak-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: white;
    color: black;
    padding: 4px 8px;
    border: 2px solid black;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    border: 4px solid black;
    padding: 2rem;
    border-radius: 0;
    width: 90%;
    max-width: 500px;
    box-shadow: 10px 10px 0px 0px black;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: translateY(20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid black;
    padding-bottom: 1rem;
}

.close-modal {
    background: transparent;
    border: 2px solid black;
    color: black;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal:hover {
    background: black;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1rem;
    border: 2px solid black;
    border-radius: 0;
    text-align: center;
    box-shadow: 3px 3px 0px 0px black;
}

.stat-card h3 {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: bold;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: black;
}

/* Simple Bar Chart */
.chart-container {
    background: white;
    padding: 1rem;
    border: 2px solid black;
    border-radius: 0;
    box-shadow: 3px 3px 0px 0px black;
    padding-bottom: 2.5rem !important;
}

.bar-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 150px;
    padding-top: 20px;
}

.chart-bar {
    width: 30px;
    background: black;
    border-radius: 0;
    position: relative;
    transition: height 1s ease;
    min-height: 4px;
    border: 1px solid black;
}

.chart-label {
    position: absolute;
    bottom: -30px !important;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem !important;
    color: #000000 !important;
    font-weight: 900 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    width: 60px;
    height: 20px;
    z-index: 5;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Increase chart container padding to accommodate larger labels */
.chart-container {
    padding-bottom: 2.5rem !important;
}

/* Settings Modal */
.settings-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid black;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.settings-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.8rem;
    border: 2px solid black;
    border-radius: 0;
    margin-bottom: 1rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: black;
    border: 1px solid black;
}

.status-dot.online {
    background: #2ed573;
    border: 1px solid black;
}

.primary-btn {
    background: black;
    border: 2px solid black;
    color: white;
    padding: 0.8rem;
    border-radius: 0;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.2);
}

.primary-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
    background: white;
    border: 2px solid black;
    color: black;
    padding: 0.6rem 1rem;
    border-radius: 0;
    font-size: 0.9rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: background 0.2s;
    box-shadow: 3px 3px 0px 0px black;
}

.secondary-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px 0px black;
}

.full-width {
    width: 100%;
}

/* Layout Wrapper for Slide Effect */
.layout-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 900px;
    /* Allow expansion */
    perspective: 1000px;
}

/* Main App Container Modifications */
.app-container {
    /* Keep existing styles but ensure it plays nice with flex */
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), margin 0.5s ease;
    z-index: 20;
    width: 100%;
    max-width: 400px;
}

.filter-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.filter-btn:active::after {
    width: 200px;
    height: 200px;
}

/* Side Panel (Tasks) - Initially Hidden */
.side-panel {
    width: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px) rotateY(10deg);
    transform-origin: left center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: auto;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

.panel-content {
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--border-color);
    padding: 1.5rem;
    width: 320px;
    /* Fixed width for panel */
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 400px;
    position: relative;
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

#panelTitle {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Permanent Marker', cursive, var(--font-family);
}

.close-panel-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-primary);
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    line-height: 1;
    padding: 0 5px;
}

.close-panel-btn:hover {
    color: red;
    transform: scale(1.1);
}

/* Connection Line */
.connection-line {
    position: absolute;
    top: 120px;
    /* Align with where main window header/body meets */
    left: -55px;
    /* Gap between windows + width of SVG */
    width: 60px;
    height: 20px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s 0.2s;
}

.connection-line svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.connection-line path {
    stroke: var(--border-color);
    stroke-width: 3px;
    fill: none;
}

.connection-line circle {
    fill: var(--border-color);
}

/* Active State: Tasks Open */
.layout-wrapper.tasks-open .app-container {
    margin: 0;
    /* Remove auto margin to allow flex gap */
    transform: translateX(0);
}

.layout-wrapper.tasks-open .side-panel {
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: translateX(0) rotateY(0deg);
    margin-left: 60px;
    /* Increased space for the connection line */
}

.layout-wrapper.tasks-open .connection-line {
    opacity: 1;
}

/* Adjustments for the moved elements */
.side-panel .view-section {
    border: none;
    padding: 0;
    background: transparent;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.side-panel .task-list {
    padding-right: 5px;
    max-height: 55vh;
    /* Adjusted for header */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .app-container {
        max-width: 90%;
        margin-bottom: 0;
        transition: margin-bottom 0.3s ease;
    }

    .layout-wrapper.tasks-open .app-container {
        margin-bottom: 40px;
        /* Space for connector */
    }

    .side-panel {
        width: 90%;
        max-width: 400px;
        transform: translateY(-20px);
        margin-left: 0 !important;
    }

    .panel-content {
        width: 100%;
        min-height: 300px;
    }

    .layout-wrapper.tasks-open .side-panel {
        transform: translateY(0);
    }

    /* Vertical Connection for Mobile */
    .connection-line {
        top: -30px;
        left: 50%;
        width: 20px;
        height: 40px;
        transform: translateX(-50%) rotate(90deg);
        transform-origin: center;
    }
}

/* ========================================
   FIXES AND OVERRIDES
   ======================================== */

/* Fix for filter button active state - only show when panel is open */

/* Remove default active state */
.filter-btn.active {
    background: white !important;
    color: var(--text-secondary) !important;
    box-shadow: 2px 2px 0px 0px var(--border-color) !important;
    transform: none !important;
}

/* Only apply active styling when tasks panel is open */
.layout-wrapper.tasks-open .filter-btn.active {
    background: var(--text-primary) !important;
    color: white !important;
    box-shadow: 1px 1px 0px 0px var(--border-color) !important;
    transform: translate(1px, 1px) !important;
}

/* Fix missing filter button styles */
.filter-btn {
    flex: 1;
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.5rem;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-weight: 700;
    cursor: pointer;
    border-radius: 0;
    transition: var(--transition-speed);
    box-shadow: 2px 2px 0px 0px var(--border-color);
}

.filter-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px var(--border-color);
}

/* Fix missing styles */
#addTaskBtn:active {
    transform: translate(0, 0);
    box-shadow: 0px 0px 0px 0px var(--border-color);
}

/* Filters container */
.filters {
    display: flex;
    gap: 0.5rem;
    background: transparent;
    padding: 0.3rem 0;
    border-radius: 0;
}

/* View Section */
.view-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 2px solid var(--border-color);
    padding: 10px;
    background: #f9f9f9;
}

/* Task List */
.task-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--text-primary) transparent;
}

/* Priority Selector */
.priority-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.priority-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.priority-options {
    display: flex;
    gap: 0.5rem;
}

.priority-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0px 0px var(--border-color);
    text-transform: uppercase;
}

.priority-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px var(--border-color);
}

.priority-btn.active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px 0px var(--border-color);
    background: var(--text-primary);
    color: white;
}

/* Priority Colors for Buttons when active */
.priority-btn[data-priority="low"].active {
    background: #2ed573;
    /* Green */
    border-color: black;
    color: black;
}

.priority-btn[data-priority="medium"].active {
    background: #ffa502;
    /* Orange */
    border-color: black;
    color: black;
}

.priority-btn[data-priority="high"].active {
    background: #ff4757;
    /* Red */
    border-color: black;
    color: white;
}

/* Task Item Priority Styles */
.task-item.priority-low {
    border-left: 6px solid #2ed573;
}

.task-item.priority-medium {
    border-left: 6px solid #ffa502;
}

.task-item.priority-high {
    border-left: 6px solid #ff4757;
}



/* =========================================
   Focus Mode Input
   ========================================= */
.focus-settings {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.retro-number-input {
    background: transparent;
    border: 3px solid black;
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    padding: 0.5rem;
    width: 80px;
    text-align: center;
    font-weight: bold;
    outline: none;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

.retro-number-input:focus {
    box-shadow: 4px 4px 0 black;
}

.input-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: black;
}


.focus-btn.icon-only {
    padding: 0;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    min-width: 0;
    margin-left: 10px;
    background: white;
    color: black;
}

.focus-btn.icon-only.active {
    background: #fbbf24;
    box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.2);
}

/* =========================================
   RexaKit Retro Cursor Trail
   ========================================= */
.cursor-trail {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #000;
    /* RexaKit retro accent */
    pointer-events: none;
    z-index: 9998;
    opacity: 0.8;
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    to {
        transform: scale(0);
        opacity: 0;
    }
}

/* Guide Modal Styling */
.large-modal {
    max-width: 800px;
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.guide-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    background: #fbbf24;
    color: black;
    padding-right: 1rem;
    padding-left: 0.5rem;
    box-shadow: 4px 4px 0px 0px var(--border-color);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.guide-step {
    border: 3px solid var(--border-color);
    padding: 1.5rem;
    position: relative;
    background: var(--bg-color);
    box-shadow: 4px 4px 0px 0px var(--border-color);
}

.step-num {
    position: absolute;
    top: -15px;
    left: -15px;
    background: black;
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.2);
}

.philosophy-block {
    margin-bottom: 1.5rem;
    border-left: 4px solid black;
    padding-left: 1rem;
}

.philosophy-block h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.philosophy-block p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.roadmap-list {
    list-style: none;
    padding: 0;
}

.roadmap-list li {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border: 2px solid var(--border-color);
    background: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.roadmap-list li.done {
    background: #e6fffa;
    color: #0d9488;
    border-color: #0d9488;
    text-decoration: line-through;
    opacity: 0.7;
}

.roadmap-list li.active {
    background: #fffbeb;
    border-color: #d97706;
    box-shadow: 4px 4px 0px 0px #d97706;
    transform: translate(-2px, -2px);
}

.blink {
    animation: blinker 1.5s linear infinite;
    color: #d97706;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.retro-divider {
    border: 0;
    height: 4px;
    background-image: repeating-linear-gradient(90deg,
            var(--border-color),
            var(--border-color) 10px,
            transparent 10px,
            transparent 20px);
    margin: 1rem 0;
    opacity: 0.5;
}

/* Info Section Styling for Main Page Embedding */
.info-section {
    width: 90%;
    max-width: 900px;
    margin: 2rem auto 4rem auto;
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--border-color);
    padding: 2.5rem;
    position: relative;
}

.info-section h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    color: var(--text-primary);
    border-bottom: 4px solid var(--border-color);
    padding-bottom: 1rem;
}

/* Productivity Tips Icons */
.tip-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1;
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.2));
}

.info-box h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #000;
    border-bottom: 2px solid #ccc;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1.4;
    text-align: center;
    font-weight: bold;
}

/* Scroll Indicator */
.scroll-indicator {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    animation: bounce 2s infinite;
    opacity: 0.6;
    cursor: default;
    user-select: none;
}

.scroll-indicator .arrow {
    font-size: 1rem;
    margin-top: 0.5rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Ad Space */
.ad-space {
    width: 100%;
    min-height: 100px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}