.feellog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}


.feellog-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feellog-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.feellog-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}


.feellog-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.feellog-section.active {
    display: block;
}

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

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


.tracker-toggles {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.toggle-btn {
    position: relative;
    cursor: pointer;
}

.toggle-btn input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.toggle-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.toggle-btn input:checked+.toggle-label {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.hidden {
    display: none !important;
}


.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

input[type="datetime-local"],
textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
}


.slide-group {
    background: var(--bg-main);
    padding: 1.25rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.slider-container {
    position: relative;
    padding: 1rem 0;
}

.slider-val {
    position: absolute;
    top: -2.5rem;
    right: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}


.pain-slider input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(to right, #4ade80, #facc15, #ef4444);
    border-radius: 4px;
}


.mood-slider input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(to right, #ef4444, #facc15, #4ade80);
    border-radius: 4px;
}


.energy-slider input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(to right, #a855f7, #f472b6, #fbbf24);
    border-radius: 4px;
}

input[type=range]::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
    border: 2px solid var(--border-light);
}


.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-toggles {
    display: flex;
    gap: 0.5rem;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    background: var(--bg-main);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle-btn:hover {
    background: var(--bg-hover);
}

.view-toggle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}


.history-chart-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chart-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.chart-body {
    width: 100%;
    height: 300px;
    min-width: 100%;

    transition: width 0.2s ease;
}


.history-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.history-item:last-child {
    border-bottom: none;
}

.history-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.history-note {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.history-badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pain {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-mood {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.badge-energy {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}


.analysis-result {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.markdown-body h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.markdown-body ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}


.pain-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pain-type-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pain-type-opt input {
    display: none;
}

.pain-type-opt .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.pain-type-opt input:checked+.dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px currentColor;
}


.pain-type-opt input[value="sharp"]:checked+.dot {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px #ef4444;
}

.pain-type-opt input[value="dull"]:checked+.dot {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px #3b82f6;
}

.pain-type-opt input[value="numb"]:checked+.dot {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px #eab308;
}

.pain-type-opt input[value="burn"]:checked+.dot {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px #f97316;
}

.body-part {
    cursor: pointer;
    transition: fill 0.2s;
}

.body-part:hover {
    opacity: 0.8;
}

.pin-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.pin-tag-remove {
    cursor: pointer;
    opacity: 0.6;
    font-weight: bold;
    padding: 0 4px;
}

.pin-tag-remove:hover {
    opacity: 1;
    color: #ef4444;
}