/**
 * Otherworld Travel Services - Whimsical Hand-Drawn Styles
 */

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Architects+Daughter&display=swap');

:root {
    --color-cream: #F5F1E8;
    --color-dark: #2C2416;
    --color-accent: #8B4513;
    --color-hover: #A0522D;
    --color-light-border: #D4C5B0;
    --border-radius: 8px;
}

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

body {
    font-family: 'IM Fell English', serif;
    background-color: var(--color-cream);
    color: var(--color-dark);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

/* Hand-drawn borders using box-shadow for sketch effect */
.sketch-border {
    position: relative;
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    box-shadow:
        0 0 0 1px var(--color-dark),
        1px 1px 0 1px var(--color-dark),
        2px 2px 0 0px rgba(44, 36, 22, 0.1);
}

.sketch-border::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid var(--color-dark);
    border-radius: var(--border-radius);
    opacity: 0.3;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.content-wrapper {
    max-width: 500px;
    margin: 40px auto;
}

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

h1 {
    font-size: 3.5em;
    font-weight: normal;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

h2 {
    font-size: 2em;
    font-weight: normal;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

h3 {
    font-size: 1.5em;
    font-weight: normal;
    margin-bottom: 15px;
}

/* Cards */
.card {
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 20px;
    box-shadow:
        0 0 0 1px var(--color-dark),
        2px 2px 0 1px rgba(44, 36, 22, 0.2),
        4px 4px 0 1px rgba(44, 36, 22, 0.1);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid var(--color-dark);
    border-radius: var(--border-radius);
    opacity: 0.2;
    pointer-events: none;
}

/* Wavy underline decoration */
.wavy-underline {
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.wavy-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10'%3E%3Cpath d='M0 5 Q 5 0, 10 5 T 20 5 T 30 5 T 40 5 T 50 5 T 60 5 T 70 5 T 80 5 T 90 5 T 100 5' stroke='%232C2416' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 40px 10px;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1em;
    font-weight: normal;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    font-family: 'IM Fell English', serif;
    font-size: 1em;
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    box-shadow:
        inset 1px 1px 0 rgba(44, 36, 22, 0.1),
        1px 1px 0 rgba(44, 36, 22, 0.2);
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow:
        inset 1px 1px 0 rgba(139, 69, 19, 0.1),
        0 0 0 2px rgba(139, 69, 19, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: 'IM Fell English', serif;
    font-size: 1.1em;
    background: var(--color-cream);
    color: var(--color-dark);
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow:
        2px 2px 0 rgba(44, 36, 22, 0.3),
        3px 3px 0 rgba(44, 36, 22, 0.2);
    position: relative;
}

.btn:hover {
    transform: translate(1px, 1px);
    box-shadow:
        1px 1px 0 rgba(44, 36, 22, 0.3),
        2px 2px 0 rgba(44, 36, 22, 0.2);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-cream);
    border-color: var(--color-dark);
}

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

.btn-large {
    padding: 16px 40px;
    font-size: 1.3em;
}

.btn-danger {
    background: #FFE5E5;
    color: #CC0000;
    border-color: #CC0000;
}

.btn-danger:hover {
    background: #FFCCCC;
    border-color: #990000;
    color: #990000;
}

/* Search Box */
.search-box {
    display: flex;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.search-box button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 12px 20px;
}

/* Checkboxes and Radio Buttons */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-dark);
    border-radius: 4px;
    background: var(--color-cream);
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-right: 10px;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--color-dark);
}

input[type="checkbox"]:checked::before {
    content: '✓';
    font-size: 18px;
    font-weight: bold;
    width: auto;
    height: auto;
}

input[type="radio"]:checked::before {
    border-radius: 50%;
}

/* Slider */
input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: var(--color-cream);
    border: 2px solid var(--color-dark);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    cursor: pointer;
    box-shadow: 1px 1px 0 rgba(44, 36, 22, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    cursor: pointer;
    box-shadow: 1px 1px 0 rgba(44, 36, 22, 0.3);
}

/* Navigation Menu */
.nav-menu {
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 12px;
}

.nav-menu li:last-child {
    margin-bottom: 0;
}

.nav-menu a {
    color: var(--color-dark);
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.nav-menu a:hover {
    color: var(--color-accent);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: 2px 2px 0 rgba(44, 36, 22, 0.2);
}

.alert-error {
    background: #FFE5E5;
    border-color: #CC0000;
}

.alert-success {
    background: #E5FFE5;
    border-color: #006600;
}

.alert-info {
    background: #E5F2FF;
    border-color: #0066CC;
}

/* Trip Card */
.trip-card {
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 2px 2px 0 rgba(44, 36, 22, 0.2);
    transition: transform 0.2s ease;
}

.trip-card:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 rgba(44, 36, 22, 0.3);
}

.trip-card h3 {
    margin-bottom: 10px;
}

.trip-card .trip-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* Profile Card (Quiz sidebar) */
.profile-card {
    position: sticky;
    top: 20px;
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow:
        2px 2px 0 rgba(44, 36, 22, 0.2),
        4px 4px 0 rgba(44, 36, 22, 0.1);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--color-cream);
    border: 3px solid var(--color-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--color-accent);
    transition: width 0.3s ease;
    border-right: 2px solid var(--color-dark);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

/* Links */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-hover);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    h2 {
        font-size: 1.5em;
    }

    .card {
        padding: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1em;
    }
}
