/* Theme System - CSS Variables */
:root {
    /* Light Theme (Day Mode) - Based on deep plum/magenta */
    --bg-primary: #f5f0f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #faf5fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent-primary: #8B4789;
    --accent-secondary: #A569A5;
    --accent-hover: #6B3570;
    --border-color: #e8d0e8;
    --shadow: rgba(139, 71, 137, 0.15);
    --shadow-hover: rgba(139, 71, 137, 0.3);
    --gradient-start: #8B4789;
    --gradient-end: #6B3570;
    --input-bg: #ffffff;
    --input-border: #d0c0d0;
    --card-bg: #ffffff;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --accent-primary: #B87AB8;
    --accent-secondary: #9B5A9B;
    --accent-hover: #D89AD8;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-hover: rgba(184, 122, 184, 0.3);
    --gradient-start: #8B4789;
    --gradient-end: #6B3570;
    --input-bg: #2d2d2d;
    --input-border: #505050;
    --card-bg: #2d2d2d;
    --error-color: #ff6b6b;
    --success-color: #51cf66;
    --warning-color: #ffd43b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

nav .theme-selector {
    display: flex;
    gap: 5px;
    margin-left: 20px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--shadow-hover);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--shadow);
}

.search-box {
    position: relative;
    margin: 30px 0;
}

.search-box input {
    padding: 15px 50px 15px 20px;
    font-size: 18px;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 5px;
}

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

.hotel-list {
    list-style: none;
}

.hotel-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.hotel-item:hover {
    background: var(--bg-tertiary);
}

.hotel-item:last-child {
    border-bottom: none;
}

.hotel-details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.hotel-details-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.hotel-details-table td:first-child {
    font-weight: 600;
    color: var(--text-secondary);
    width: 40%;
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.success-message {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.theme-selector {
    display: flex;
    gap: 4px;
    margin-left: auto;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.theme-selector.standalone {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    margin-left: 0;
    padding-left: 8px;
    border-left: none;
}

.theme-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.theme-btn:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.theme-btn.active {
    background: var(--accent-primary);
    color: white;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav .theme-selector {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: 15px;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
