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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-accent: #e8e8ed;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent-blue: #007aff;
    --accent-blue-hover: #0051d5;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1d1d1f;
    --bg-secondary: #2c2c2e;
    --bg-accent: #3a3a3c;
    --text-primary: #f5f5f7;
    --text-secondary: #98989d;
    --accent-blue: #0a84ff;
    --accent-blue-hover: #409cff;
    --shadow: rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: var(--bg-secondary);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--bg-accent);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
}

header {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.hero {
    text-align: center;
    padding: 6rem 5% 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

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

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

.btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-accent);
    transform: translateY(-2px);
}

/* ========== CAROUSEL STYLES ========== */
.app-preview {
    max-width: 1600px;
    margin: 4rem auto;
    padding: 0 4%;
}

.screenshot-carousel {
    position: relative;
    width: 100%;
}

.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.carousel-slides {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg-secondary);
    padding: 2rem;
    box-shadow: 0 20px 60px var(--shadow);
}

.slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.slide.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-images {
    position: relative;
    width: 100%;
    display: block;
    text-align: center;
}

.screenshot-img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow);
    background: var(--bg-primary);
    display: none;
    margin: 0 auto;
    object-fit: contain;
}

.screenshot-img.mobile {
    width: auto;
    max-width: 320px;
    max-height: 600px;
    border-radius: 24px;
    border: 8px solid #1c1c1e;
    display: none;
}

/* 1. Wide Desktop: > 1100px - SIDE BY SIDE */
@media (min-width: 1101px) {
    .slide-images {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 3rem;
    }

    [data-theme="light"] .screenshot-img.light.wide {
        display: block;
        flex: 3;
        max-width: 950px;
    }

    [data-theme="dark"] .screenshot-img.dark.wide {
        display: block;
        flex: 3;
        max-width: 950px;
    }

    .screenshot-img.mobile {
        display: block;
        flex: 1;
        max-width: 320px;
    }
}

/* 2. Narrow Desktop / Tablet: 769px - 1100px - SINGLE VIEW */
@media (min-width: 769px) and (max-width: 1100px) {
    [data-theme="light"] .screenshot-img.light.narrow {
        display: block;
    }

    [data-theme="dark"] .screenshot-img.dark.narrow {
        display: block;
    }
}

/* 3. Mobile Screens: < 769px - SINGLE VIEW */
@media (max-width: 768px) {
    .screenshot-img.mobile {
        display: block;
        margin: 0 auto;
    }
}

.slide-caption {
    text-align: center;
    margin-top: 2rem;
}

.slide-caption h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.slide-caption p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.carousel-btn {
    background: var(--bg-secondary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: var(--bg-accent);
    transform: scale(1.1);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-primary);
}

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

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-accent);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-blue);
    width: 32px;
    border-radius: 6px;
}

.dot:hover {
    background: var(--accent-blue);
    opacity: 0.7;
}

/* ========== END CAROUSEL STYLES ========== */

.features {
    padding: 6rem 5%;
    background: var(--bg-secondary);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-blue);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.how-it-works {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4rem;
}

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

.workflow-step {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.workflow-step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

.workflow-step h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.workflow-step p {
    color: var(--text-secondary);
}

.task-categories {
    padding: 4rem 1rem;
}

.category-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.category-header h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.category-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #007bff;
    transition: transform 0.2s ease;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #007bff;
    font-weight: 700;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.category-item h5 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.category-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.category-item.ongoing {
    border-left-color: #3b82f6;
}

.category-item.overdue {
    border-left-color: #ef4444;
}

.category-item.today {
    border-left-color: #10b981;
}

.category-item.future {
    border-left-color: #8b5cf6;
}

.category-item.backlog {
    border-left-color: #6b7280;
}

.logic-footer {
    max-width: 800px;
    margin: 3rem auto 0 auto;
    padding: 1.5rem;
    background: rgba(0, 123, 255, 0.05);
    border: 1px dashed #007bff;
    border-radius: 8px;
    text-align: center;
}

.logic-footer p {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.download-section {
    text-align: center;
    padding: 6rem 5%;
    background: var(--bg-secondary);
}

.download-section h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.download-section p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.platform-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.platform-btn {
    background: var(--bg-primary);
    padding: 1.5rem 2.5rem;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.platform-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow);
}

.platform-btn img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.platform-btn svg {
    width: 32px;
    height: 32px;
}

.platform-info {
    text-align: left;
}

.platform-info .platform-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.platform-info .platform-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

footer {
    text-align: center;
    padding: 3rem 5%;
    color: var(--text-secondary);
}

.coming-soon {
    display: inline-block;
    background: var(--accent-blue);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* ========== MODAL STYLES ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-secondary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-accent);
    transform: rotate(90deg);
}

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--bg-accent);
}

.modal-header img {
    width: 48px;
    height: 48px;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.modal-steps {
    padding: 2rem;
}

.modal-steps ol {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
}

.modal-steps li {
    counter-increment: step-counter;
    position: relative;
    padding: 1rem 1rem 1rem 3.5rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    line-height: 1.6;
}

.modal-steps li:last-child {
    margin-bottom: 0;
}

.modal-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.modal-steps code {
    background: var(--bg-accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--accent-blue);
}

.modal-steps strong {
    color: var(--accent-blue);
}

.modal-footer {
    padding: 1rem 2rem 2rem 2rem;
    display: flex;
    justify-content: center;
}

.download-btn {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.download-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* ========== MODERN MODAL STYLES ========== */

.modal {
    display: none;
    /* JS toggles this to 'flex' */
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-primary);
    width: 100%;
    max-width: 500px;
    border-radius: 30px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 2.5rem;
    border: 1px solid var(--bg-accent);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--bg-secondary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #ff3b30;
    color: white;
    transform: rotate(90deg);
}

.modal-header-inline {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header-inline img {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 14px;
}

/* INSTRUCTION LIST */
.instruction-list {
    list-style: none;
    margin-bottom: 2rem;
}

.instruction-list li {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.step-badge {
    background: var(--accent-blue);
    color: white;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.modal-action {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.modal-tip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

code {
    background: var(--bg-accent);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-family: monospace;
    color: var(--accent-blue);
}

/* ========== CATEGORIES & FOOTER ========== */
.category-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 6px solid var(--accent-blue);
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: scale(1.02);
}

.platform-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

footer {
    padding: 4rem 5%;
    text-align: center;
    opacity: 0.6;
}

/* ========== SUPPORT SECTION ========== */
.support-section {
    padding: 6rem 5%;
    background: var(--bg-primary);
    text-align: center;
}

.support-container {
    max-width: 600px;
    margin: 0 auto;
}

.support-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

.support-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 2;
}

.support-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.support-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.support-email {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    padding: 1rem 2.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.support-email:hover {
    background: var(--bg-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow);
}

.support-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .support-section h2 {
        font-size: 2rem;
    }

    .support-email {
        font-size: 1.2rem;
        padding: 0.875rem 2rem;
    }
}