body {
        background-color: #fff5ec;
        margin: 0;
        padding: 0;
        color: #333;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .learning-container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 20px;
        box-sizing: border-box;
        flex: 1;
    }

    .header-layout {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 30px;
        margin-bottom: 40px;
    }

    .title-block {
        flex: 0 0 350px;
    }

    .sticker-canvas-wrapper {
        flex: 1;
        display: flex;
        align-items: center;
        background: rgba(0, 0, 0, 0.03);
        border-radius: 20px;
        padding: 6px;
        border: 1px solid rgba(0, 0, 0, 0.05);
        min-height: 130px;
        overflow: hidden;
    }

    .sticker-canvas {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
        padding: 5px;
        width: 100%;
        scroll-behavior: smooth;
    }

    .sticker-canvas::-webkit-scrollbar {
        height: 6px;
    }

    .sticker-canvas::-webkit-scrollbar-thumb {
        background: #e0e0e0;
        border-radius: 10px;
    }

    .add-sticker-btn {
        flex-shrink: 0;
        width: 80px;
        height: 110px;
        border: 2px dashed #bdc3c7;
        border-radius: 12px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.8em;
        color: #bdc3c7;
        cursor: pointer;
        transition: all 0.2s;
        margin-right: 10px;
        font-family: var(--font-heading);
    }

    .add-sticker-btn:hover {
        border-color: #7f8c8d;
        color: #7f8c8d;
        background: rgba(255, 255, 255, 0.5);
        transform: translateY(-2px);
    }

    /* Compact stickers for horizontal view */
    .sticker-canvas .sticker-thought {
        flex-shrink: 0;
        width: 140px !important;
        height: 110px !important;
        margin: 0 !important;
        font-size: 0.85em;
        position: relative;
        transform: rotate(0deg) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        border-radius: 12px;
        overflow: hidden;
    }

    .back-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #888;
        text-decoration: none;
        margin-bottom: 30px;
        font-weight: 600;
        transition: color 0.2s;
    }

    .learning-card {
        background: white;
        padding: 50px 40px;
        border-radius: 24px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
        border: 1px solid #f0e0d0;
        margin-bottom: 40px;
        text-align: center;
    }

    .sentence-display {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 15px;
        min-height: 220px;
        margin: 40px 0;
        flex-wrap: wrap;
        padding: 20px;
        background: #fafafa;
        border-radius: 20px;
        border: 1px dashed #eee;
        position: relative;
    }

    .word-slot {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        min-width: 60px;
        transition: all 0.3s;
    }

    .word-label {
        font-size: 0.65rem;
        font-weight: 800;
        color: #95a5a6;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 2px 6px;
        border-radius: 4px;
        background: #eee;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .word-slot.visible .word-label {
        opacity: 1;
    }

    .word-box {
        font-size: 2rem;
        font-weight: 700;
        padding: 8px 16px;
        border-radius: 12px;
        background: white;
        color: #2c3e50;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        border-bottom: 4px solid #dfe6e9;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        white-space: nowrap;
    }

    .word-slot.visible .word-box {
        opacity: 1;
        transform: translateY(0);
    }

    /* Part highlighting */
    .word-part {
        display: inline-block;
    }

    .word-part.ending {
        color: #e74c3c;
        font-weight: 800;
    }

    .word-part.suffix {
        color: #2980b9;
    }

    .word-translation {
        font-size: 0.85rem;
        color: #7f8c8d;
        font-weight: 500;
        opacity: 0;
        transition: opacity 0.3s;
        max-width: 120px;
        text-align: center;
        line-height: 1.2;
    }

    .show-translation .word-slot.visible .word-translation {
        opacity: 1;
    }

    /* Flash Mode: Only words, no labels or translations */
    .flash-mode .word-label,
    .flash-mode .word-translation {
        display: none !important;
    }

    .flash-mode .word-box {
        border-bottom-color: transparent !important;
        box-shadow: none !important;
        background: transparent !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .flash-mode .word-part {
        color: inherit !important;
        font-weight: inherit !important;
    }

    /* Role-based Colors */
    .role-Predicate .word-box {
        border-color: #ff7675;
    }

    .role-Subject .word-box {
        border-color: #74b9ff;
    }

    .role-Attribute .word-box,
    .role-Attribute_Subject .word-box {
        border-color: #55efc4;
    }

    .role-Attribute_Object .word-box {
        border-color: #55efc4;
    }

    .role-Object .word-box {
        border-color: #a29bfe;
    }

    .role-Circumstance .word-box,
    .role-Adverbial .word-box {
        border-color: #ffeaa7;
    }

    .role-Predicate .word-label {
        color: #d63031;
        background: #fff5f5;
    }

    .role-Subject .word-label {
        color: #0984e3;
        background: #f0f7ff;
    }

    .role-Attribute .word-label,
    .role-Attribute_Subject .word-label {
        color: #00b894;
        background: #f0fffb;
    }

    .role-Attribute_Object .word-label {
        color: #00b894;
        background: #f0fffb;
    }

    .role-Object .word-label {
        color: #6c5ce7;
        background: #f5f3ff;
    }

    .role-Circumstance .word-label,
    .role-Adverbial .word-label {
        color: #e67e22;
        background: #fffcf0;
    }

    .controls {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 30px;
    }

    .btn-action {
        padding: 12px 30px;
        border-radius: 30px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s;
        border: none;
        display: flex;
        align-items: center;
        gap: 8px;
        font-family: inherit;
    }

    .btn-run {
        background: #2c3e50;
        color: white;
    }

    .btn-run:hover {
        background: #34495e;
        transform: scale(1.05);
    }

    .btn-toggle {
        background: #fdfaf7;
        color: #f2994a;
        border: 1px solid #f2994a;
    }

    .btn-toggle.active {
        background: #f2994a;
        color: white;
    }

    .lang-selector {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-bottom: 30px;
    }

    .lang-btn {
        padding: 8px 20px;
        border: 2px solid #ddd;
        background: white;
        border-radius: 20px;
        cursor: pointer;
        font-weight: 600;
        font-family: inherit;
    }

    .lang-btn.active {
        border-color: #f2994a;
        color: #f2994a;
    }

    .legend {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 40px;
        font-size: 0.8rem;
        color: #888;
    }

    .legend-item {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }