:root {
	--primary: #2563eb;
	--primary-hover: #1d4ed8;
	--bg: #f8fafc;
	--card-bg: #ffffff;
	--text: #1e293b;
	--text-secondary: #64748b;
	--border: #e2e8f0;
}

body {
	font-family: "Inter", sans-serif;
	background-color: var(--bg);
	color: var(--text);
	line-height: 1.5;
	margin: 0;
	padding: 20px;
}

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

header {
	text-align: center;
	margin-bottom: 40px;
}

header h1 {
	font-size: 2.5rem;
	margin-bottom: 10px;
	color: var(--primary);
}

header p {
	color: var(--text-secondary);
}

.form-group {
	margin-bottom: 20px;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
}

input,
select {
	width: 100%;
	padding: 10px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 16px;
	box-sizing: border-box;
}

input:focus,
select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
	width: 100%;
	padding: 12px;
	background-color: var(--primary);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}

button:hover {
	background-color: var(--primary-hover);
}

button:disabled {
	background-color: var(--text-secondary);
	cursor: not-allowed;
}

button.secondary {
	background-color: white;
	color: var(--text);
	border: 1px solid var(--border);
}

button.secondary:hover {
	background-color: var(--bg);
}

/* Tags Input */
.tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.tag {
	background-color: #e0f2fe;
	color: #0369a1;
	padding: 4px 12px;
	border-radius: 16px;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.tag .remove {
	cursor: pointer;
	font-weight: bold;
}

/* Loading State */
.hidden {
	display: none !important;
}

#loading {
	text-align: center;
	margin-top: 40px;
}

.spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #e2e8f0;
	border-top: 4px solid var(--primary);
	border-radius: 50%;
	margin: 0 auto 20px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Result */
#result {
	margin-top: 40px;
	background: var(--card-bg);
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.day-card {
	border-left: 4px solid var(--primary);
	padding-left: 20px;
	margin-bottom: 30px;
}

.activity {
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--border);
}

.activity:last-child {
	border-bottom: none;
}

.activity-time {
	font-weight: 600;
	color: var(--primary);
	font-size: 14px;
}

.activity-title {
	font-weight: 600;
	margin: 4px 0;
}

.activity-desc {
	color: var(--text-secondary);
	font-size: 14px;
}

/* Markdown Content */
.markdown-content {
	line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
	color: var(--text);
	margin-top: 1.5em;
	margin-bottom: 0.5em;
}

.markdown-content h1 {
	font-size: 2rem;
	color: var(--primary);
}

.markdown-content h2 {
	font-size: 1.5rem;
	border-bottom: 2px solid var(--border);
	padding-bottom: 0.5rem;
}

.markdown-content h3 {
	font-size: 1.25rem;
	font-weight: 600;
}

.markdown-content ul,
.markdown-content ol {
	padding-left: 1.5rem;
	margin-bottom: 1rem;
}

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

.markdown-content p {
	margin-bottom: 1rem;
}

.markdown-content strong {
	font-weight: 600;
	color: var(--text);
}

.markdown-content blockquote {
	border-left: 4px solid var(--primary);
	padding-left: 1rem;
	margin-left: 0;
	color: var(--text-secondary);
	font-style: italic;
}

/* Trip UI Styles */
.trip-header {
	position: relative;
	height: 300px;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 24px;
	color: white;
}

.trip-header-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.trip-header-content {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 24px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
	box-sizing: border-box;
}

.trip-header h1 {
	margin: 0;
	font-size: 2.5rem;
	color: white;
}

.trip-header .dates {
	font-size: 1.1rem;
	opacity: 0.9;
}

.trip-section {
	margin-bottom: 32px;
}

.trip-section h2 {
	font-size: 1.5rem;
	margin-bottom: 16px;
	color: var(--text);
}

.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.info-card {
	background: var(--bg);
	padding: 16px;
	border-radius: 8px;
}

.info-card .label {
	font-size: 0.875rem;
	color: var(--text-secondary);
	margin-bottom: 4px;
}

.info-card .value {
	font-size: 1.125rem;
	font-weight: 600;
}

.activities-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.activity-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	background: white;
	border: 1px solid var(--border);
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 0.9rem;
}

.timeline-day {
	background: white;
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 20px;
}

.day-header {
	background: var(--bg);
	padding: 16px;
	border-bottom: 1px solid var(--border);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.day-header .title {
	font-weight: 600;
	font-size: 1.1rem;
}

.day-header .date {
	color: var(--text-secondary);
}

.timeline-items {
	padding: 16px;
}

.timeline-item {
	position: relative;
	padding-left: 24px;
	margin-bottom: 24px;
	border-left: 2px solid var(--border);
}

.timeline-item:last-child {
	margin-bottom: 0;
	border-left-color: transparent;
}

.timeline-item::before {
	content: "";
	position: absolute;
	left: -6px;
	top: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--item-color, var(--primary));
}

.item-content {
	background: var(--bg);
	border-radius: 8px;
	padding: 12px;
	margin-top: -6px;
}

.item-header {
	display: flex;
	justify-content: space-between;
	align-items: start;
	margin-bottom: 8px;
}

.item-title {
	font-weight: 600;
}

.item-desc {
	font-size: 0.9rem;
	color: var(--text-secondary);
	margin-bottom: 12px;
}

.item-meta {
	display: flex;
	gap: 16px;
	font-size: 0.8rem;
	color: var(--text-secondary);
}

.accommodation-card,
.ticket-card {
	background: white;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 16px;
	display: flex;
	gap: 20px;
}

.card-image {
	width: 120px;
	height: 120px;
	border-radius: 8px;
	object-fit: cover;
}

.card-content {
	flex: 1;
}

.card-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 4px;
}

.card-subtitle {
	color: var(--text-secondary);
	font-size: 0.9rem;
	margin-bottom: 12px;
}

.card-price {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--primary);
}

.room-list {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--border);
}

.room-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 0.9rem;
}
