:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    background-image: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 260px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10;
}

.sidebar-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.menu-item {
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease-in-out;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.menu-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-left: 4px solid #3b82f6;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
    overflow-y: auto;
}

header {
    margin-bottom: 1.5rem;
    text-align: left;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

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

.controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.control-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    cursor: pointer;
}

select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0,0,0,0.2);
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.price-cell {
    font-weight: 700;
    color: #34d399;
}

.score-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
}

.score-high { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.5); }
.score-mid { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.5); }
.score-low { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.5); }

.low-floor-badge {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.5);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.chart-container {
    height: 350px;
    width: 100%;
}

/* Landscape Phone / Small Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 130px; /* Reduced by half */
        padding: 1.5rem 0.75rem;
    }
    .sidebar-logo {
        font-size: 1.2rem;
        margin-bottom: 2rem;
        word-break: keep-all;
        text-align: center;
    }
    .menu-item {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        overflow-y: auto;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }
    .sidebar-logo {
        width: 100%;
        margin-bottom: 0.5rem;
        font-size: 1.5rem;
        text-align: left;
    }
    .menu-item {
        flex: 1;
        margin-bottom: 0;
        justify-content: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.95rem;
    }
    .main-wrapper {
        padding: 1rem;
        overflow-y: visible;
    }
    .controls-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .control-group {
        width: 100%;
    }
    .card {
        padding: 1rem;
    }
    .card h2 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}
