/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme colors */
    --bg-primary: linear-gradient(135deg, #3F4257 0%, #8A9BC2 50%, #C0D9D9 100%);
    --text-primary: #333;
    --text-secondary: #3F4257;
    --bg-card: rgba(245, 245, 245, 0.95);
    --bg-card-hover: rgba(245, 245, 245, 0.9);
    --border-color: rgba(138, 155, 194, 0.2);
    --border-hover: rgba(138, 155, 194, 0.5);
    --shadow-color: rgba(63, 66, 87, 0.15);
    --shadow-hover: rgba(63, 66, 87, 0.2);
    --flex-bg: rgba(192, 217, 217, 0.3);
    --flex-hover: rgba(192, 217, 217, 0.5);
    --button-bg: linear-gradient(135deg, #4A90E2, #357ABD);
    --button-hover: linear-gradient(135deg, #357ABD, #2E5A8A);
    --button-shadow: rgba(74, 144, 226, 0.4);
    --button-shadow-hover: rgba(74, 144, 226, 0.6);
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --text-primary: #e0e0e0;
    --text-secondary: #b8b8b8;
    --bg-card: rgba(30, 30, 45, 0.95);
    --bg-card-hover: rgba(40, 40, 55, 0.9);
    --border-color: rgba(100, 100, 150, 0.2);
    --border-hover: rgba(120, 120, 180, 0.5);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --flex-bg: rgba(60, 60, 80, 0.3);
    --flex-hover: rgba(80, 80, 100, 0.5);
    --button-bg: linear-gradient(135deg, #667eea, #764ba2);
    --button-hover: linear-gradient(135deg, #764ba2, #667eea);
    --button-shadow: rgba(102, 126, 234, 0.4);
    --button-shadow-hover: rgba(102, 126, 234, 0.6);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.dayManager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
}

.dayManager h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-align: center;
    flex: 1;
    min-width: 200px;
    transition: color 0.3s ease;
}

/* Theme toggle styles */
.themeToggle {
    flex-shrink: 0;
}

.themeButton {
    background: var(--button-bg);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--button-shadow);
}

.themeButton:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--button-shadow-hover);
}

.themeIcon {
    transition: transform 0.3s ease;
}

.themeButton:hover .themeIcon {
    transform: rotate(180deg);
}

/* Main content */
.mainContent {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.mainContent h1 {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    text-align: center;
    transition: color 0.3s ease;
}

/* Grid layout */
.gridContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gridItem {
    background: var(--bg-card-hover);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.gridItem:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    border-color: var(--border-hover);
}

.gridItem h2 {
    color: var(--text-secondary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #8A9BC2;
    padding-bottom: 8px;
    transition: color 0.3s ease;
}

.gridItem p {
    margin-bottom: 8px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

/* Flex container for packing list and facilities */
.flexContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.flexItem {
    background: var(--flex-bg);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #8A9BC2;
    transition: background-color 0.3s ease;
}

.flexItem:hover {
    background: var(--flex-hover);
}

.flexItem p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Button styles */
.fancyButton {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--button-bg);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--button-shadow);
    min-width: 120px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.fancyButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.fancyButton:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--button-shadow-hover);
}

.fancyButton:hover::before {
    left: 100%;
}

.fancyButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px var(--button-shadow);
}

/* Directions section */
.directionsSection {
    grid-column: span 2;
}

.directions {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.directions:hover {
    transform: scale(1.05);
}

/* Wind compass */
.windCompass {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 15px auto;
}

.windCompass img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Utility classes */
.bold {
    font-weight: bold;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px;
        margin-bottom: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .mainContent {
        padding: 20px;
    }
    
    .dayManager {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .dayManager h2 {
        font-size: 1.2rem;
        min-width: auto;
    }
    
    .mainContent h1 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .gridContainer {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .directionsSection {
        grid-column: span 1;
    }
    
    .flexContainer {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .fancyButton {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .windCompass {
        width: 60px;
        height: 60px;
    }
    
    .themeToggle {
        order: -1;
        align-self: center;
    }
    
    .themeButton {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .header {
        padding: 10px;
    }
    
    .mainContent {
        padding: 15px;
    }
    
    .gridItem {
        padding: 15px;
    }
    
    .flexContainer {
        grid-template-columns: 1fr;
    }
    
    .flexItem {
        text-align: center;
    }
    
    .dayManager h2 {
        font-size: 1rem;
    }
    
    .mainContent h1 {
        font-size: 1.3rem;
    }
    
    .gridItem h2 {
        font-size: 1.1rem;
    }
    
    .fancyButton {
        padding: 8px 16px;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .themeButton {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
