:root {
    --primary-color: #007bff;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --background-color: #fff;
    --header-bg: #fff;
    --form-bg: #fff;
    --button-bg: var(--primary-color);
    --button-text: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --primary-color: #0056b3;
    --secondary-color: #222;
    --text-color: #f8f9fa;
    --background-color: #333;
    --header-bg: #444;
    --form-bg: #444;
    --button-bg: var(--primary-color);
    --button-text: #fff;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
}

header {
    background-color: var(--header-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.5rem;
}

main {
    padding: 2rem;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .container {
        grid-template-columns: 1fr 2fr;
    }
}

#trip-form, #plan-output {
    background-color: var(--form-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: box-shadow 0.3s;
}

#trip-form:hover, #plan-output:hover {
    box-shadow: 0 6px 12px var(--shadow-color);
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-top: 0;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"], input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

button, #theme-switcher {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover, #theme-switcher:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

#plan-output p {
    line-height: 1.8;
}

#plan-output h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
}

#plan-output ul {
    list-style-type: none;
    padding-left: 0;
}

#plan-output li {
    background-color: var(--secondary-color);
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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