.container-fluid {
    padding: 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, #F3F0FF 0%, #E6F0FF 50%, #DFF7FF 100%);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(120, 120, 255, 0.12);
    border: 1px solid rgba(120, 120, 255, 0.18);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left h1 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 800;
    background: linear-gradient(135deg, #5B5BD6 0%, #1C7ED6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-back {
    text-decoration: none;
    color: #3B3B95;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(230, 240, 255, 1) 0%, rgba(243, 240, 255, 1) 100%);
    border-radius: 50px;
    border: 2px solid rgba(91, 91, 214, 0.55);
}

.btn-back:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 5px 20px rgba(91, 91, 214, 0.25);
}

.emotion-main {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.emotion-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(120, 120, 255, 0.12);
    border: 1px solid rgba(120, 120, 255, 0.18);
    transition: all 0.3s;
}

.emotion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(120, 120, 255, 0.18);
}

.emotion-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 3px solid rgba(91, 91, 214, 0.35);
    padding-bottom: 12px;
    font-weight: 800;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #5B5BD6 0%, #1C7ED6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.week-summary {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    background: linear-gradient(135deg, #F3F0FF 0%, #E6F0FF 100%);
    padding: 18px;
    border-radius: 16px;
    border: 2px solid rgba(91, 91, 214, 0.22);
    margin-bottom: 18px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.summary-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #5B5BD6 0%, #1C7ED6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.week-chart-container {
    background: linear-gradient(135deg, #F3F0FF 0%, #E6F0FF 100%);
    padding: 20px;
    border-radius: 16px;
    border: 2px solid rgba(91, 91, 214, 0.22);
}

.week-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 160px;
    gap: 12px;
}

.week-bar-chart .chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.week-bar-chart .chart-bar {
    width: 100%;
    background: linear-gradient(to top, rgba(91, 91, 214, 0.45), rgba(28, 126, 214, 0.95));
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    min-height: 2px;
}

.week-bar-chart .chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #3B3B95;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.week-bar-chart .chart-bar:hover::after {
    opacity: 1;
}

.week-bar-chart .chart-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.week-bar-chart .chart-label.today {
    color: #3B3B95;
    font-weight: 800;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

label {
    font-weight: 700;
    color: #3B3B95;
    font-size: 0.95rem;
}

input[type="text"],
input[type="datetime-local"],
select.select {
    border: 2px solid rgba(91, 91, 214, 0.22);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s;
    background: #F3F0FF;
    color: var(--text-primary);
}

input[type="text"]:focus,
input[type="datetime-local"]:focus,
select.select:focus {
    border-color: #5B5BD6;
    box-shadow: 0 0 0 4px rgba(91, 91, 214, 0.14);
    outline: none;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.btn-quick {
    background: linear-gradient(135deg, #F3F0FF 0%, #E6F0FF 100%);
    border: 2px solid rgba(91, 91, 214, 0.22);
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.02rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #3B3B95;
    font-weight: 700;
}

.btn-quick:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 91, 214, 0.22);
    border-color: rgba(28, 126, 214, 0.6);
}

.emotion-logs .empty-tip {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-size: 1rem;
}

.log-date-header {
    font-size: 0.9rem;
    font-weight: 800;
    color: #3B3B95;
    background: linear-gradient(135deg, #F3F0FF 0%, #E6F0FF 100%);
    padding: 8px 16px;
    border-radius: 50px;
    margin: 18px 0 12px 0;
    position: sticky;
    top: 0;
    z-index: 1;
    border: 1px solid rgba(91, 91, 214, 0.18);
}

.log-date-header:first-child {
    margin-top: 0;
}

.log-item {
    display: grid;
    grid-template-columns: 80px 120px 110px 1fr 130px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid rgba(91, 91, 214, 0.14);
    transition: all 0.2s;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    gap: 10px;
}

.log-item:hover {
    background: #F3F0FF;
    transform: translateX(5px);
}

.log-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.log-mood {
    font-weight: 800;
    color: #3B3B95;
}

.log-intensity {
    color: var(--text-secondary);
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.log-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-edit-small {
    background: linear-gradient(135deg, rgba(91, 91, 214, 0.18) 0%, rgba(28, 126, 214, 0.25) 100%);
    color: #3B3B95;
    cursor: pointer;
    border: none;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-edit-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 91, 214, 0.2);
}

.btn-delete-small {
    background: linear-gradient(135deg, var(--accent) 0%, #FF5252 100%);
    color: white;
    cursor: pointer;
    border: none;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-delete-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.35);
}

@media (max-width: 900px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .log-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .log-actions {
        justify-content: flex-start;
    }

    .log-intensity {
        text-align: left;
    }

    .log-note {
        white-space: normal;
    }
}

