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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;
    background: linear-gradient(115deg, #011450 0%, #011450 40%, #2E2AAC 100%);
    min-height: 100vh;
    padding: 40px 20px;
    color: #FFFFFF;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.main-title {
    font-size: 38px;
    font-weight: 350;
    color: #FFFFFF;
    margin-bottom: 12px;
    letter-spacing: 10.8px;
}

.subtitle {
    font-size: 14px;
    color: #8072FD;
    font-weight: 200;
    letter-spacing: 3.6px;
}

/* Input Card */
.input-card {
    background: linear-gradient(115deg, #131146 0%, #131146 40%, #2E2AAC 100%);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.conversation-input {
    width: 100%;
    background: linear-gradient(115deg, #555EFD 0%, #555EFD 40%, #D9ADF5 100%);
    border: none;
    border-radius: 16px;
    padding: 24px;
    font-size: 16px;
    color: #FFFFFF;
    resize: vertical;
    min-height: 180px;
    font-family: inherit;
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.conversation-input::placeholder {
    color: #FFFFFF;
}

.conversation-input:focus {
    outline: none;
    box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.3);
}

.input-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: #283CA0;
    color: #E6E8F0;
    border: none;
}

.btn-primary:hover {
    background-color: #1e2d7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 60, 160, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Timeline Card */
.timeline-card {
    background: linear-gradient(115deg, #131146 0%, #131146 40%, #2E2AAC 100%);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.timeline-title {
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
}

.timeline-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-outline {
    background-color: transparent;
    border: 0.5px solid #FFFFFF;
    color: #FFFFFF;
    padding: 10px 24px;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-outline-danger {
    background-color: transparent;
    border: 0.5px solid #FFCACA;
    color: #FFFFFF;
    padding: 10px 24px;
}

.btn-outline-danger:hover {
    background-color: rgba(255, 202, 202, 0.1);
    transform: translateY(-2px);
}

/* Timeline Content */
.timeline-content {
    background: linear-gradient(115deg, #555EFD 0%, #555EFD 40%, #D9ADF5 100%);
    border-radius: 16px;
    padding: 24px;
    min-height: 200px;
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.2);
}

.empty-message {
    text-align: left;
    color: #FFFFFF;
    font-size: 16px;
    margin: 0;
}

/* Note Items */
.note-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.note-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.note-timestamp {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.note-delete {
    background: transparent;
    border: 1px solid rgba(255, 202, 202, 0.6);
    color: #FFCACA;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.note-delete:hover {
    background: rgba(255, 202, 202, 0.2);
    border-color: #FFCACA;
}

.note-summary {
    font-size: 15px;
    color: #FFFFFF;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.5;
}

.note-content {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.note-content.expanded {
    max-height: none;
    -webkit-line-clamp: unset;
}

.note-toggle {
    margin-top: 8px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
}

.note-toggle:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 36px;
    }

    .subtitle {
        font-size: 14px;
    }

    .input-card,
    .timeline-card {
        padding: 24px;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-actions {
        width: 100%;
    }

    .btn {
        flex: 1;
        min-width: 80px;
    }

    .input-actions {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Feedback Message Animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Backdrop filter fallback for unsupported browsers */
@supports not (backdrop-filter: blur(10px)) {
    .note-item {
        background: rgba(255, 255, 255, 0.25);
    }
}
