#trading-plan-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#trading-plan-app * {
    box-sizing: border-box;
}

.tp-progress-container {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.tp-intro {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.tp-intro h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #0a0a0a;
}

.tp-intro p {
    margin: 0 0 12px 0;
    color: #555555;
    line-height: 1.6;
}

.tp-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666666;
}

.tp-progress-count {
    color: #0a0a0a;
}

.tp-progress-bar-wrapper {
    background: #e5e5e5;
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
}

.tp-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #f7fe78, #d6e85c);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(247, 254, 120, 0.3);
}

.tp-save-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, #f7fe78, #d6e85c);
    color: #000000;
    border: 1px solid #d6e85c;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d6e85c, #b9d047);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 254, 120, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.tp-btn-secondary {
    background: #ffffff;
    color: #333333;
    border: 2px solid #f7fe78;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tp-phase-section {
    margin-bottom: 40px;
}

.tp-phase-header {
    margin-bottom: 20px;
}

.tp-phase-title {
    font-size: 32px;
    font-weight: 800;
    color: #0a0a0a;
    margin: 0 0 8px 0;
    position: relative;
    padding-bottom: 12px;
}

.tp-phase-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f7fe78, #d6e85c);
    border-radius: 2px;
}

.tp-phase-subtitle {
    font-size: 16px;
    color: #666666;
}

.tp-weeks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tp-week-card {
    background: #FFFFFF;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tp-week-card-locked {
    cursor: not-allowed;
    opacity: 0.55;
    position: relative;
}

.tp-week-card-locked:hover {
    transform: none;
    box-shadow: none;
    background: #FFFFFF;
    border-color: #F0F0F0;
}

.tp-week-card-lock {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666666;
    border-radius: 12px;
    pointer-events: none;
    line-height: 1.4;
}

.tp-week-card:hover {
    background: #fffef0;
    border-color: #f7fe78;
    box-shadow: 0 4px 12px rgba(247, 254, 120, 0.15);
    transform: translateY(-2px);
}

.tp-phase-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.badge-foundation {
    background: linear-gradient(135deg, #d6e85c, #b9d047);
    color: #000000;
}

.badge-practice {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: #ffffff;
}

.badge-mastery {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #ffffff;
}

.badge-generic {
    background: #e5e5e5;
    color: #333333;
}

.tp-week-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tp-week-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f7fe78, #d6e85c);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tp-week-number {
    font-size: 16px;
    font-weight: 700;
    color: #0a0a0a;
}

.tp-week-title {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
    margin-bottom: 12px;
}

.tp-week-subtitle {
    font-size: 13px;
    color: #666666;
    margin: -8px 0 12px 0;
    line-height: 1.5;
}

.tp-week-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888888;
}

.tp-week-progress {
    margin-top: 12px;
}

.tp-week-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666666;
    margin-bottom: 6px;
}

.tp-week-progress-bar {
    background: #e5e5e5;
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
}

.tp-week-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f7fe78, #d6e85c);
    transition: width 0.3s ease;
}

.tp-checkmark {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
}

.tp-week-detail {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.tp-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666666;
    transition: all 0.2s ease;
    z-index: 10;
}

.tp-close-btn:hover {
    background: #f7fe78;
    border-color: #d6e85c;
    color: #000000;
    transform: scale(1.1);
}

.tp-detail-header {
    margin-bottom: 30px;
}

.tp-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tp-detail-title {
    font-size: 36px;
    font-weight: 800;
    color: #0a0a0a;
    margin-bottom: 20px;
    padding-right: 50px;
}

.tp-detail-subtitle {
    font-size: 18px;
    color: #666666;
    margin: -12px 0 16px 0;
}

.tp-week-type-label {
    font-size: 12px;
    font-weight: 700;
    color: #888888;
    text-transform: uppercase;
}

.tp-goal-box {
    background: linear-gradient(135deg, #fffef0, #f0ffe0);
    border-left: 4px solid #f7fe78;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.tp-goal-label {
    font-size: 12px;
    font-weight: 700;
    color: #5a7a00;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tp-goal-text {
    color: #333333;
    line-height: 1.6;
}

.tp-description-box {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.tp-content-sections {
    margin-bottom: 30px;
}

.tp-info-section {
    background: linear-gradient(135deg, #e8f5ff, #f0f9ff);
    border-left: 4px solid #3b82f6;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.tp-info-header {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 8px;
}

.tp-info-content {
    font-size: 14px;
    color: #333333;
    line-height: 1.6;
}

.tp-collapsible-section {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.tp-section-toggle {
    width: 100%;
    background: #fafafa;
    border: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.tp-section-toggle:hover {
    background: #f0f0f0;
}

.tp-toggle-icon {
    font-size: 14px;
    color: #666666;
    transition: transform 0.2s ease;
}

.tp-section-title-text {
    font-size: 16px;
    font-weight: 700;
    color: #0a0a0a;
    flex: 1;
}

.tp-section-content {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #e5e5e5;
}

.tp-content-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: #333333;
    margin: 16px 0 12px 0;
}

.tp-content-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.tp-content-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    line-height: 1.6;
    color: #555555;
}

.tp-content-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #f7fe78;
    font-weight: 700;
}

.tp-content-list li strong {
    color: #0a0a0a;
}

.tp-dont-do-box {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.tp-dont-do-title {
    font-size: 18px;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-dont-do-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tp-dont-do-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    color: #333333;
}

.tp-dont-do-item .icon {
    color: #ef4444;
    font-weight: 700;
    font-size: 18px;
}

.tp-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.tp-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f7fe78, #d6e85c);
    border-radius: 2px;
}

.tp-tasks-list {
    margin-bottom: 30px;
}

.tp-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.tp-task-item:hover {
    background: rgba(247, 254, 120, 0.08);
    border-radius: 8px;
}

.tp-task-item.tp-task-item-complete {
    background: rgba(247, 254, 120, 0.12);
    border-radius: 8px;
}

.tp-task-item.tp-task-item-complete .tp-task-label {
    color: #2f490a;
}

.tp-task-status-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #365314;
    border: 2px solid rgba(54, 83, 20, 0.25);
    border-radius: 6px;
    background: #ffffff;
    flex-shrink: 0;
}

.tp-task-item.tp-task-item-complete .tp-task-status-icon {
    background: #f7fe78;
    border-color: #d6e85c;
}

.tp-task-item.tp-task-item-complete .tp-task-label {
    color: #2f490a;
}

.tp-task-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    margin-left: 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: rgba(247, 254, 120, 0.8);
    color: #2f490a;
}

.tp-task-item:not(.tp-task-item-complete) .tp-task-status-badge {
    display: none;
}

.tp-task-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tp-task-checkbox:checked {
    background: #f7fe78;
    border-color: #d6e85c;
    transform: scale(1.1);
}

.tp-task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000000;
    font-weight: bold;
    font-size: 12px;
}

.tp-task-label {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
}

.tp-task-checkbox:checked ~ .tp-task-label {
    color: #5a7a00;
    text-decoration: line-through;
}

.tp-excel-box,
.tp-reflexion-box {
    background: #ffffff;
    border: 2px solid #f7fe78;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.tp-reflexion-box {
    border-color: #a78bfa;
}

.tp-infobox-title {
    font-size: 16px;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 12px;
}

.tp-infobox-content p {
    font-size: 14px;
    color: #555555;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.tp-infobox-content p:last-child {
    margin-bottom: 0;
}

.tp-infobox-content strong {
    color: #0a0a0a;
    font-weight: 600;
}

.tp-inputs-list {
    margin-bottom: 30px;
}

.tp-input-item {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.tp-input-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 10px;
}

.tp-input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.tp-input-field:focus {
    outline: none;
    border-color: #f7fe78;
    box-shadow: 0 0 0 3px rgba(247, 254, 120, 0.1);
}

.tp-detail-nav {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.tp-nav-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tp-nav-back {
    background: #ffffff;
    color: #333333;
    border: 2px solid #e5e5e5;
}

.tp-nav-next {
    flex: 1;
    background: linear-gradient(135deg, #f7fe78, #d6e85c);
    color: #000000;
    border: 1px solid #d6e85c;
}

.tp-nav-next:disabled {
    background: #e5e5e5;
    color: #999999;
    cursor: not-allowed;
    opacity: 0.5;
}

.tp-warning-box {
    background: #fff9e6;
    border: 1px solid #f7fe78;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #666666;
}

.tp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.tp-modal.active {
    display: flex;
}

.tp-modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tp-modal-content h3 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 16px 0;
}

.tp-modal-content p {
    color: #666666;
    margin-bottom: 20px;
}

.tp-link-display {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.tp-link-display code {
    font-size: 12px;
    color: #333333;
    word-break: break-all;
    font-family: monospace;
}

.tp-modal-actions {
    display: flex;
    gap: 12px;
}

.tp-modal-actions button {
    flex: 1;
}

.tp-empty-state {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #555555;
}

.tp-empty-state p {
    margin-bottom: 20px;
    font-size: 16px;
}

.tp-debug-panel {
    margin-top: 32px;
    padding: 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, 0.2);
    font-size: 12px;
    color: #0f172a;
}

.tp-debug-panel summary {
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tp-debug-panel pre {
    margin: 12px 0 0;
    padding: 12px;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    max-height: 200px;
    overflow: auto;
    font-size: 11px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    #trading-plan-app {
        padding: 16px;
    }

    .tp-week-detail {
        padding: 24px;
    }

    .tp-detail-title {
        font-size: 28px;
    }

    .tp-weeks-grid {
        grid-template-columns: 1fr;
    }

    .tp-close-btn {
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .btn-primary,
    .tp-btn-secondary,
    .tp-nav-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

