:root {
    /* Warm & Pop Color Palette */
    --color-primary: #FF7F50;
    /* Coral */
    --color-secondary: #FFD700;
    /* Gold */
    --color-accent: #FF69B4;
    /* HotPink */
    --color-background: #FFF5E1;
    /* Seashell/Cream */
    --color-text: #4A4A4A;
    /* Dark Gray */
    --color-white: #FFFFFF;
    --color-shadow: rgba(0, 0, 0, 0.1);

    --font-family: 'Helvetica Neue', Arial, sans-serif;
    --border-radius: 16px;
    --spacing-unit: 8px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* Utility Classes */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-unit) * 2;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: bold;
    text-align: center;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 6px var(--color-shadow);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: 0 2px 8px var(--color-shadow);
    margin-bottom: 16px;
}

/* Header */
header {
    background-color: var(--color-white);
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 4px var(--color-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    color: var(--color-primary);
    font-size: 1.5rem;
}

/* Editor Specific Styles */
.editor-header {
    display: flex;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.editor-header-content {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    gap: 8px;
}

.editor-title-row {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.editor-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline {
    padding: 16px;
    padding-bottom: 200px;
    /* Extra space for bottom palette */
    min-height: calc(100vh - 160px);
    max-width: 600px;
    margin: 0 auto;
}

.block {
    background: var(--color-white);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 8px;
    border-left: 8px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.block-header {
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.block-content {
    font-size: 0.95rem;
}

.block-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.block-input:focus {
    border-color: var(--color-primary);
    background: #fff;
}

.bottom-palette {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 200;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.palette-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60px;
    background: var(--color-white);
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--color-text);
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 6px 4px;
}

.palette-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.palette-btn:active {
    transform: scale(0.95);
}

.palette-icon {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

@media (max-width: 480px) {
    .bottom-palette {
        padding: 6px;
        gap: 5px;
    }

    .palette-btn {
        font-size: 0.6rem;
        border-radius: 8px;
        min-height: 55px;
    }

    .palette-icon {
        font-size: 1.1rem;
    }
}

.block-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-move {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: var(--color-white);
    color: var(--color-primary);
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-move:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.3);
}

.btn-move:active {
    transform: scale(0.95);
}

.btn-delete {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e74c3c;
    background: var(--color-white);
    color: #e74c3c;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-delete:hover {
    background: #e74c3c;
    color: var(--color-white);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-delete:active {
    transform: scale(0.95);
}

/* ============= Enhanced Editor UI Styles ============= */

/* Block Focus State */
.block:focus-within {
    border-left-color: var(--color-accent);
    box-shadow: 0 6px 20px rgba(255, 127, 80, 0.15);
}

/* Block Drag State */
.block.dragging {
    opacity: 0.7;
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

/* Block Insert Animation */
.block.newly-inserted {
    animation: blockInsert 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes blockInsert {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

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

/* Block Delete Animation */
.block.deleting {
    animation: blockDelete 0.3s ease-out forwards;
}

@keyframes blockDelete {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.9) translateX(-10px);
    }
}

/* Enhanced Input Field Styles */
.block-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    font-size: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.block-input:hover {
    border-color: #ccc;
    background: #fff;
}

.block-input:focus {
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 127, 80, 0.1);
}

.block-input::placeholder {
    color: #aaa;
    transition: color 0.2s;
}

.block-input:focus::placeholder {
    color: #ccc;
}

/* Textarea Enhanced */
textarea.block-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* Select Enhanced */
select.block-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    /* Override transition to prevent arrow animation */
    transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
}

select.block-input:hover {
    border-color: var(--color-primary);
}

/* Editor Tab Enhanced Animations */
.editor-tab {
    position: relative;
    overflow: hidden;
}

.editor-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.editor-tab:hover::before {
    width: 50%;
}

.editor-tab.active::before {
    width: 100%;
}

.editor-tab:active {
    transform: scale(0.98);
}

/* Button Ripple Effect Base */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s, opacity 0.4s;
    opacity: 0;
}

.btn:active::after {
    width: 300%;
    height: 300%;
    opacity: 0;
    transition: none;
}

/* Primary Button Enhanced */
.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(255, 127, 80, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 127, 80, 0.3);
}

/* Secondary Button Enhanced */
.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.25);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

/* Page Footer Controls Enhanced */
.page-footer-controls {
    animation: slideUpFooter 0.3s ease-out;
}

@keyframes slideUpFooter {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Page Navigation Buttons Enhanced */
#prev-page-btn,
#next-page-btn {
    font-size: 1.1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#prev-page-btn:hover,
#next-page-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.3);
}

#prev-page-btn:active,
#next-page-btn:active {
    transform: scale(0.95);
}

/* Page Indicator Styling */
#page-indicator {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Save Button Success State */
#save-btn.saving {
    pointer-events: none;
    opacity: 0.8;
}

#save-btn.saved {
    background: #4CAF50 !important;
    color: white !important;
    border-color: #4CAF50 !important;
    animation: saveSuccess 0.5s ease;
}

@keyframes saveSuccess {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Block Controls Enhanced */
.block-controls button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Color Swatch Selection */
.color-option:hover .color-swatch {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-option input:checked+.color-swatch {
    transform: scale(1.1);
    border-color: #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Timeline Scroll Indicator */
.timeline::after {
    content: '';
    display: block;
    height: 100px;
    pointer-events: none;
}

/* Block Type Indicator */
.block[data-type="text"] {
    border-left-color: #FF7F50;
}

.block[data-type="background"] {
    border-left-color: #2196F3;
}

.block[data-type="character"] {
    border-left-color: #E91E63;
}

.block[data-type="bgm"] {
    border-left-color: #667eea;
}

.block[data-type="se"] {
    border-left-color: #764ba2;
}

.block[data-type="choice"] {
    border-left-color: #FF9800;
}

.block[data-type="effect"] {
    border-left-color: #00BCD4;
}

.block[data-type="picture"] {
    border-left-color: #9C27B0;
}

/* Tooltip Base */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Landing Page Styles */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-links a {
    margin-left: 20px;
    font-weight: bold;
    color: var(--color-text);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.hero-section {
    background: linear-gradient(135deg, var(--color-background) 0%, #fff 100%);
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 32px;
}

.features-section {
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

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

.feature-card {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--color-text);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--color-text);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    margin: 8px auto 0;
    border-radius: 2px;
}

.project-list-section {
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.project-thumb {
    height: 160px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ddd;
}

.project-info {
    padding: 20px;
    flex-grow: 1;
}

.project-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--color-text);
}

.project-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 16px;
}

.project-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.create-card {
    border: 2px dashed #ddd;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    cursor: pointer;
    color: #888;
    transition: all 0.2s;
}

.create-card:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(255, 127, 80, 0.05);
}

.create-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Editor Tab Navigation */
.editor-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 2px solid #eee;
    padding: 0 20px;
    max-width: 600px;
    margin: 0 auto;
    position: sticky;
    top: 64px;
    z-index: 99;
}

.editor-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.editor-tab:hover {
    color: var(--color-primary);
}

.editor-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
}

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

.assets-container,
.publish-settings {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.asset-upload {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.asset-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.publish-settings form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.publish-settings label {
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .nav-links {
        display: none;
    }

    .editor-tabs {
        padding: 0 10px;
    }

    .editor-tab {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Project Grid Layout */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
        gap: 8px;
        padding: 0 8px;
    }

    .project-card {
        margin-bottom: 0;
        padding: 0;
        /* Remove padding from card container */
        border-radius: 8px;
    }

    .project-thumb {
        height: 70px;
        /* Even smaller thumb */
        font-size: 1.5rem;
        border-radius: 8px 8px 0 0;
        /* Top corners only */
        margin-bottom: 0;
        background: #f0f0f0;
    }

    .project-info {
        padding: 8px;
        /* Much smaller padding */
    }

    .project-title {
        font-size: 0.8rem;
        margin-bottom: 4px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
        height: 2.6em;
    }

    .project-meta {
        font-size: 0.65rem;
        margin-bottom: 6px;
    }

    .project-actions {
        display: flex;
        flex-direction: row;
        gap: 4px;
        margin-top: 4px;
    }

    .project-actions .btn {
        padding: 4px 0;
        font-size: 0.7rem;
        /* Smaller font */
        flex: 1;
        height: 28px;
        border-radius: 4px;
        line-height: 1;
        /* Ensure text is centered vertically */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .create-card {
        min-height: 140px;
        padding: 10px;
        font-size: 0.85rem;
        /* Reduce base font size for card */
    }


    .create-card:hover {
        border-color: var(--color-primary);
        color: var(--color-primary);
        background: rgba(255, 127, 80, 0.05);
    }

    .create-icon {
        font-size: 3rem;
        margin-bottom: 16px;
    }

    /* Editor Tab Navigation */
    .editor-tabs {
        display: flex;
        gap: 0;
        background: #fff;
        border-bottom: 2px solid #eee;
        padding: 0 20px;
        max-width: 600px;
        margin: 0 auto;
        position: sticky;
        top: 64px;
        z-index: 99;
    }

    .editor-tab {
        padding: 12px 24px;
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        font-weight: bold;
        color: #888;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.95rem;
    }

    .editor-tab:hover {
        color: var(--color-primary);
    }

    .editor-tab.active {
        color: var(--color-primary);
        border-bottom-color: var(--color-primary);
    }

    .tab-content {
        position: relative;
    }

    .tab-panel {
        display: none;
    }

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

    .assets-container,
    .publish-settings {
        max-width: 600px;
        margin: 0 auto;
        padding: 20px;
    }

    .asset-upload {
        display: flex;
        gap: 12px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }

    .asset-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 16px;
    }

    .publish-settings form {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .publish-settings label {
        font-weight: bold;
        margin-bottom: 4px;
        display: block;
    }

    @media (max-width: 768px) {
        .hero-title {
            font-size: 2rem;
        }

        .nav-links {
            display: none;
        }

        .editor-tabs {
            padding: 0 10px;
        }

        .editor-tab {
            padding: 10px 16px;
            font-size: 0.85rem;
        }
    }

    /* Project Grid Layout */
    .project-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 0 20px;
        max-width: 1200px;
        margin: 0 auto;
    }

    @media (max-width: 600px) {
        .project-grid {
            grid-template-columns: repeat(2, 1fr);
            /* 2 columns on mobile */
            gap: 8px;
            padding: 0 8px;
        }

        .project-card {
            margin-bottom: 0;
            padding: 0;
            /* Remove padding from card container */
            border-radius: 8px;
        }

        .project-thumb {
            height: 70px;
            /* Even smaller thumb */
            font-size: 1.5rem;
            border-radius: 8px 8px 0 0;
            /* Top corners only */
            margin-bottom: 0;
            background: #f0f0f0;
        }

        .project-info {
            padding: 8px;
            /* Much smaller padding */
        }

        .project-title {
            font-size: 0.8rem;
            margin-bottom: 4px;
            white-space: normal;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
            height: 2.6em;
        }

        .project-meta {
            font-size: 0.65rem;
            margin-bottom: 6px;
        }

        .project-actions {
            display: flex;
            flex-direction: row;
            gap: 4px;
            margin-top: 4px;
        }

        .project-actions .btn {
            padding: 4px 0;
            font-size: 0.7rem;
            /* Smaller font */
            flex: 1;
            height: 28px;
            border-radius: 4px;
            line-height: 1;
            /* Ensure text is centered vertically */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .create-card {
            min-height: 140px;
            padding: 10px;
            font-size: 0.85rem;
            /* Reduce base font size for card */
        }

        .create-icon {
            font-size: 1.8rem;
            margin-bottom: 8px;
        }

        .create-card span:last-child {
            font-size: 0.8rem;
            /* Specifically reduce the text size */
        }
    }

    /* Page Management Footer */
    .page-footer-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid #ddd;
        padding: 10px 20px;
        display: flex;
        display: block;
    }

    .assets-container,
    .publish-settings {
        max-width: 600px;
        margin: 0 auto;
        padding: 20px;
    }

    .asset-upload {
        display: flex;
        gap: 12px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }

    .asset-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 16px;
    }

    .publish-settings form {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .publish-settings label {
        font-weight: bold;
        margin-bottom: 4px;
        display: block;
    }

    @media (max-width: 768px) {
        .hero-title {
            font-size: 2rem;
        }

        .nav-links {
            display: none;
        }

        .editor-tabs {
            padding: 0 10px;
        }

        .editor-tab {
            padding: 10px 16px;
            font-size: 0.85rem;
        }
    }

    /* Project Grid Layout */
    .project-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 0 20px;
        max-width: 1200px;
        margin: 0 auto;
    }

    @media (max-width: 600px) {
        .project-grid {
            grid-template-columns: repeat(2, 1fr);
            /* 2 columns on mobile */
            gap: 8px;
            padding: 0 8px;
        }

        .project-card {
            margin-bottom: 0;
            padding: 0;
            /* Remove padding from card container */
            border-radius: 8px;
        }

        .project-thumb {
            height: 70px;
            /* Even smaller thumb */
            font-size: 1.5rem;
            border-radius: 8px 8px 0 0;
            /* Top corners only */
            margin-bottom: 0;
            background: #f0f0f0;
        }

        .project-info {
            padding: 8px;
            /* Much smaller padding */
        }

        .project-title {
            font-size: 0.8rem;
            margin-bottom: 4px;
            white-space: normal;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
            height: 2.6em;
        }

        .project-meta {
            font-size: 0.65rem;
            margin-bottom: 6px;
        }

        .project-actions {
            display: flex;
            flex-direction: row;
            gap: 4px;
            margin-top: 4px;
        }

        .project-actions .btn {
            padding: 4px 0;
            font-size: 0.7rem;
            /* Smaller font */
            flex: 1;
            height: 28px;
            border-radius: 4px;
            line-height: 1;
            /* Ensure text is centered vertically */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .create-card {
            min-height: 140px;
            padding: 10px;
            font-size: 0.85rem;
            /* Reduce base font size for card */
        }

        .create-icon {
            font-size: 1.8rem;
            margin-bottom: 8px;
        }

        .create-card span:last-child {
            font-size: 0.8rem;
            /* Specifically reduce the text size */
        }
    }

    /* Page Management Footer */
    .page-footer-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid #ddd;
        padding: 10px 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .page-selector-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #f5f5f5;
        padding: 4px 12px;
        border-radius: 20px;
        border: 1px solid #ddd;
    }

    .page-selector {
        border: none;
        background: transparent;
        font-size: 1rem;
        font-weight: bold;
        color: var(--color-primary);
        cursor: pointer;
        outline: none;
        min-width: 100px;
    }

    /* Adjust timeline bottom padding to account for footer */
    .timeline {
        padding-bottom: 80px;
    }

    /* Adjust bottom palette position if it exists */
    .bottom-palette {
        bottom: 70px;
        /* Move up above the footer */
    }

    /* Mobile adjustments for page footer */
    @media (max-width: 600px) {
        padding: 20px;
    }

    .asset-upload {
        display: flex;
        gap: 12px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }

    .asset-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 16px;
    }

    .publish-settings form {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .publish-settings label {
        font-weight: bold;
        margin-bottom: 4px;
        display: block;
    }

    @media (max-width: 768px) {
        .hero-title {
            font-size: 2rem;
        }

        .nav-links {
            display: none;
        }

        .editor-tabs {
            padding: 0 10px;
        }

        .editor-tab {
            padding: 10px 16px;
            font-size: 0.85rem;
        }
    }

    /* Project Grid Layout */
    .project-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 0 20px;
        max-width: 1200px;
        margin: 0 auto;
    }

    @media (max-width: 600px) {
        .project-grid {
            grid-template-columns: repeat(2, 1fr);
            /* 2 columns on mobile */
            gap: 8px;
            padding: 0 8px;
        }

        .project-card {
            margin-bottom: 0;
            padding: 0;
            /* Remove padding from card container */
            border-radius: 8px;
        }

        .project-thumb {
            height: 70px;
            /* Even smaller thumb */
            font-size: 1.5rem;
            border-radius: 8px 8px 0 0;
            /* Top corners only */
            margin-bottom: 0;
            background: #f0f0f0;
        }

        .project-info {
            padding: 8px;
            /* Much smaller padding */
        }

        .project-title {
            font-size: 0.8rem;
            margin-bottom: 4px;
            white-space: normal;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
            height: 2.6em;
        }

        .project-meta {
            font-size: 0.65rem;
            margin-bottom: 6px;
        }

        .project-actions {
            display: flex;
            flex-direction: row;
            gap: 4px;
            margin-top: 4px;
        }

        .project-actions .btn {
            padding: 4px 0;
            font-size: 0.7rem;
            /* Smaller font */
            flex: 1;
            height: 28px;
            border-radius: 4px;
            line-height: 1;
            /* Ensure text is centered vertically */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .create-card {
            min-height: 140px;
            padding: 10px;
            font-size: 0.85rem;
            /* Reduce base font size for card */
        }

        .create-icon {
            font-size: 1.8rem;
            margin-bottom: 8px;
        }

        .create-card span:last-child {
            font-size: 0.8rem;
            /* Specifically reduce the text size */
        }
    }

    /* Page Management Footer */
    .page-footer-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid #ddd;
        padding: 10px 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .page-selector-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #f5f5f5;
        padding: 4px 12px;
        border-radius: 20px;
        border: 1px solid #ddd;
    }

    .page-selector {
        border: none;
        background: transparent;
        font-size: 1rem;
        font-weight: bold;
        color: var(--color-primary);
        cursor: pointer;
        outline: none;
        min-width: 100px;
    }

    /* Adjust timeline bottom padding to account for footer */
    .timeline {
        padding-bottom: 80px;
    }

    /* Adjust bottom palette position if it exists */
    .bottom-palette {
        bottom: 70px;
        /* Move up above the footer */
    }

    /* Mobile adjustments for page footer */
    @media (max-width: 600px) {
        .page-footer-controls {
            padding: 8px 12px;
            gap: 8px;
        }

        .page-footer-controls .btn {
            padding: 4px 10px;
            font-size: 0.85rem;
            height: 32px;
        }

        .page-selector-wrapper {
            padding: 2px 8px;
            transform: translateX(-50%);
        }

        .publish-settings form {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .publish-settings label {
            font-weight: bold;
            margin-bottom: 4px;
            display: block;
        }

        @media (max-width: 768px) {
            .hero-title {
                font-size: 2rem;
            }

            .nav-links {
                display: none;
            }

            .editor-tabs {
                padding: 0 10px;
            }

            .editor-tab {
                padding: 10px 16px;
                font-size: 0.85rem;
            }
        }

        /* Project Grid Layout */
        .project-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            padding: 0 20px;
            max-width: 1200px;
            margin: 0 auto;
        }

        @media (max-width: 600px) {
            .project-grid {
                grid-template-columns: repeat(2, 1fr);
                /* 2 columns on mobile */
                gap: 8px;
                padding: 0 8px;
            }

            .project-card {
                margin-bottom: 0;
                padding: 0;
                /* Remove padding from card container */
                border-radius: 8px;
            }

            .project-thumb {
                height: 70px;
                /* Even smaller thumb */
                font-size: 1.5rem;
                border-radius: 8px 8px 0 0;
                /* Top corners only */
                margin-bottom: 0;
                background: #f0f0f0;
            }

            .project-info {
                padding: 8px;
                /* Much smaller padding */
            }

            .project-title {
                font-size: 0.8rem;
                margin-bottom: 4px;
                white-space: normal;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                line-height: 1.3;
                height: 2.6em;
            }

            .project-meta {
                font-size: 0.65rem;
                margin-bottom: 6px;
            }

            .project-actions {
                display: flex;
                flex-direction: row;
                gap: 4px;
                margin-top: 4px;
            }

            .project-actions .btn {
                padding: 4px 0;
                font-size: 0.7rem;
                /* Smaller font */
                flex: 1;
                height: 28px;
                border-radius: 4px;
                line-height: 1;
                /* Ensure text is centered vertically */
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .create-card {
                min-height: 140px;
                padding: 10px;
                font-size: 0.85rem;
                /* Reduce base font size for card */
            }

            .create-icon {
                font-size: 1.8rem;
                margin-bottom: 8px;
            }

            .create-card span:last-child {
                font-size: 0.8rem;
                /* Specifically reduce the text size */
            }
        }

        /* Page Management Footer */
        .page-footer-controls {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-top: 1px solid #ddd;
            padding: 10px 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            z-index: 1000;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        }

        .page-selector-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            background: #f5f5f5;
            padding: 4px 12px;
            border-radius: 20px;
            border: 1px solid #ddd;
        }

        .page-selector {
            border: none;
            background: transparent;
            font-size: 1rem;
            font-weight: bold;
            color: var(--color-primary);
            cursor: pointer;
            outline: none;
            min-width: 100px;
        }

        /* Adjust timeline bottom padding to account for footer */
        .timeline {
            padding-bottom: 80px;
        }

        /* Adjust bottom palette position if it exists */
        .bottom-palette {
            bottom: 70px;
            /* Move up above the footer */
        }

        /* Mobile adjustments for page footer */
        @media (max-width: 600px) {
            .page-footer-controls {
                padding: 8px 12px;
                gap: 8px;
            }

            .page-footer-controls .btn {
                padding: 4px 10px;
                font-size: 0.85rem;
                height: 32px;
            }

            .page-selector-wrapper {
                padding: 2px 8px;
                transform: translateX(-50%);
                border-radius: 12px 12px 0 0;
                border-left: 1px solid #ddd;
                border-right: 1px solid #ddd;
                box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
            }
        }

        /* PC adjustments for page footer */
        @media (min-width: 769px) {
            .page-footer-controls {
                width: auto !important;
                min-width: 450px;
                max-width: 600px;
                left: 50% !important;
                transform: translateX(-50%);
                border-radius: 12px 12px 0 0;
                border-left: 1px solid #ddd;
                border-right: 1px solid #ddd;
                background: rgba(255, 255, 255, 0.98) !important;
                box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
                z-index: 2000 !important;
            }
        }