/* puzzle.css — Your exact color scheme + modern glass design */
:root {
    --primary: #4a7bd8;
    --primary-light: #6c9eff;
    --primary-dark: #325eb1;
    --accent: #8b5cf6;
    --bg: #0f172a;
    --card-bg: rgba(255,255,255,0.08);
    --border: rgba(255,255,255,0.15);
    --text: #e2e8f0;
    --text-light: #94a3b8;
}

body {
    background: linear-gradient(135deg, #0a1428 0%, #1e293b 100%);
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
}

/* NAVBAR — Beautiful & Glowing */
.navbar {
    background: rgba(10, 20, 40, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(74, 123, 216, 0.3);
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.nav-item {
    color: #cbd5e1;
    font-weight: 600;
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}
.nav-item:hover {
    color: white;
    background: rgba(74, 123, 216, 0.2);
    transform: translateY(-2px);
}
.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 8px 25px rgba(74, 123, 216, 0.5);
    font-weight: 700;
}

/* Header */
.trade-header {
    text-align: center;
    padding: 3.5rem 1rem 2.5rem;
    background: linear-gradient(135deg, rgba(74, 123, 216, 0.25), rgba(139, 92, 246, 0.2));
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(74, 123, 216, 0.3);
    margin: -1rem -1rem 2.5rem;
    border-radius: 0 0 28px 28px;
}
.trade-header h1 {
    font-size: 3.2rem;
    font-weight: 900;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 0.6rem;
}
.trade-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    color: #cbd5e1;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    transition: all 0.4s ease;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(74, 123, 216, 0.3);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
    padding: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    display: inline-flex;
}
.tab {
    padding: 1rem 2.2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 8px 25px rgba(74, 123, 216, 0.5);
}
.tab:hover:not(.active) {
    background: rgba(74, 123, 216, 0.2);
    color: white;
}

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
}
input, select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(74, 123, 216, 0.4);
    color: white;
    padding: 1rem;
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s ease;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(74, 123, 216, 0.3);
}

/* Buttons */
button {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 1rem 2.2rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(74, 123, 216, 0.4);
}
button:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(74, 123, 216, 0.6);
}

/* Tiles */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.tile-item {
    background: rgba(74, 123, 216, 0.15);
    border: 1px solid rgba(74, 123, 216, 0.4);
    border-radius: 16px;
    padding: 1.1rem;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}
.tile-item:hover {
    background: rgba(74, 123, 216, 0.4);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(74, 123, 216, 0.4);
}

/* Status & Matches */
.status.ok { background: rgba(34, 197, 94, 0.2); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.5); }
.status.error { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); }
.match-card { 
    background: rgba(74, 123, 216, 0.1); 
    border: 1px solid rgba(74, 123, 216, 0.4);
    border-left: 5px solid var(--primary-light);
}
.match-count {
    background: linear-gradient(135deg, #10b981, #34d399);
}

/* Fix: Make dropdown text visible when open */
select {
    background: rgba(15, 23, 42, 0.95) !important;     /* dark blue background */
    color: #e2e8f0 !important;                       /* light text */
    border: 1px solid rgba(74, 123, 216, 0.6) !important;
}

/* Make the dropdown arrow look nice */
select::-webkit-appearance: none;
select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 3rem !important;
}

/* Fix the actual dropdown menu items (most important!) */
select option {
    background: #0f172a !important;   /* same dark background */
    color: #e2e8f0 !important;         /* light text */
    padding: 1rem;
}