:root {
    /* ═══ Light Theme ═══ */
    --bg-primary: #f8fafc;
    --bg-body: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-main: #0f172a;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #64748b;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-rgb: 99, 102, 241;
    --accent-color: #f59e0b;
    --accent-rgb: 245, 158, 11;
    --success-color: #10b981;
    --success-rgb: 16, 185, 129;
    --danger-color: #ef4444;
    --danger-rgb: 239, 68, 68;
    --warning-color: #f59e0b;
    --uw-navy: #0f172a;
    --uw-gold: #c5a059;
    --border-color: rgba(226, 232, 240, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
    --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.1), 0 10px 20px -5px rgba(0,0,0,0.04);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

[data-theme="dark"] {
    /* ═══ Dark Theme ═══ */
    --bg-primary: #020617;
    --bg-body: #020617;
    --bg-card: rgba(15, 23, 42, 0.7);
    --text-main: #ffffff;
    --text-primary: #f1f5f9;
    --text-secondary: #d1d5db;
    --text-muted: #d1d5db;
    --primary-color: #a5b4fc;
    --primary-hover: #818cf8;
    --primary-rgb: 165, 180, 252;
    --accent-color: #fcd34d;
    --accent-rgb: 252, 211, 77;
    --success-color: #6ee7b7;
    --success-rgb: 110, 231, 183;
    --danger-color: #fca5a5;
    --danger-rgb: 252, 165, 165;
    --warning-color: #fcd34d;
    --uw-navy: #ffffff;
    --uw-gold: #e8c96a;
    --border-color: rgba(71, 85, 105, 0.5);
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3);
    --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.6), 0 10px 20px -5px rgba(0,0,0,0.3);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ═══ Utilities ═══ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

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

/* ═══ Glassmorphism ═══ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

/* ═══ Navbar ═══ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* ═══ Dropdown ═══ */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow-xl);
    z-index: 100;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown .dropdown-menu[style*="opacity: 1"] {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-color);
    padding-left: 1.25rem;
}

/* ═══ Forms ═══ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* ═══ Cards ═══ */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Glassmorphism when background image is active */
.uw-bg-active .card,
.uw-bg-active .glass {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(20px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255,255,255,0.3) !important;
}
[data-theme="dark"] .uw-bg-active .card,
[data-theme="dark"] .uw-bg-active .glass {
    background: rgba(15, 23, 42, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
.uw-bg-active footer {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}
[data-theme="dark"] .uw-bg-active footer {
    background: rgba(15, 23, 42, 0.5) !important;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-rgb), 0.3);
}

/* ═══ Progress Bars ═══ */
.progress-container {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* ═══ Badges ═══ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(var(--success-rgb), 0.12);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent-color);
}

.badge-danger {
    background: rgba(var(--danger-rgb), 0.12);
    color: var(--danger-color);
}

/* ═══ Dark mode — form & misc ═══ */
[data-theme="dark"] body,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] label,
[data-theme="dark"] div,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-primary);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-main);
}

[data-theme="dark"] a,
[data-theme="dark"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] a:hover,
[data-theme="dark"] .nav-link:hover {
    color: var(--primary-color);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text-main);
    border-color: rgba(71, 85, 105, 0.5);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
    color: var(--text-main);
}

[data-theme="dark"] .card,
[data-theme="dark"] .glass {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(71, 85, 105, 0.4);
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] small,
[data-theme="dark"] .text-secondary {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] strong,
[data-theme="dark"] b {
    color: var(--text-main);
}

[data-theme="dark"] hr {
    border-color: rgba(71, 85, 105, 0.5);
}

[data-theme="dark"] ::selection {
    background: rgba(var(--primary-rgb), 0.3);
    color: white;
}

/* ── Dark: Navbar ── */
[data-theme="dark"] .navbar {
    background: rgba(2, 6, 23, 0.9);
    border-bottom-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .dropdown-menu {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(71, 85, 105, 0.5);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-color);
}

/* ── Dark: Footer ── */
[data-theme="dark"] footer {
    background: rgba(2, 6, 23, 0.95);
    border-top-color: rgba(71, 85, 105, 0.3);
}

/* ── Dark: Uni Panel ── */
[data-theme="dark"] .uni-name,
[data-theme="dark"] .uni-location,
[data-theme="dark"] .uni-stat-label,
[data-theme="dark"] .uni-stat-val,
[data-theme="dark"] .uni-tag {
    color: var(--text-primary);
}

[data-theme="dark"] .uni-panel-tech .uni-tag { color: #22d3ee; background: rgba(34,211,238,0.12); }
[data-theme="dark"] .uni-panel-arts .uni-tag { color: #c084fc; background: rgba(192,132,252,0.12); }
[data-theme="dark"] .uni-panel-diplomacy .uni-tag { color: #fbbf24; background: rgba(251,191,36,0.12); }
[data-theme="dark"] .uni-panel-medicine .uni-tag { color: #fca5a5; background: rgba(252,165,165,0.1); }
[data-theme="dark"] .uni-panel-business .uni-tag { color: #6ee7b7; background: rgba(110,231,183,0.1); }
[data-theme="dark"] .uni-panel-default .uni-tag { color: #a5b4fc; background: rgba(165,180,252,0.1); }

[data-theme="dark"] .uni-btn-compare {
    border-color: rgba(71, 85, 105, 0.5);
    color: var(--text-primary);
}

/* ── Dark: Pricing ── */
[data-theme="dark"] .card[style*="border: 2px solid"],
[data-theme="dark"] .card[style*="border: 1px solid"] {
    background: rgba(15, 23, 42, 0.8);
}

/* ── Dark: Button text visibility ── */
[data-theme="dark"] .btn-primary {
    color: #020617;
}

[data-theme="dark"] .btn-outline {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .btn-outline:hover {
    color: #020617;
}

/* ── Dark: Badge text ── */
[data-theme="dark"] .badge-primary { color: var(--primary-color); }
[data-theme="dark"] .badge-success { color: var(--success-color); }
[data-theme="dark"] .badge-warning { color: var(--accent-color); }
[data-theme="dark"] .badge-danger { color: var(--danger-color); }

[data-theme="dark"] button:not([type="submit"]),
[data-theme="dark"] .btn {
    color: var(--text-main);
}

[data-theme="dark"] table {
    color: var(--text-primary);
}

[data-theme="dark"] ul li,
[data-theme="dark"] ol li {
    color: var(--text-primary);
}

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ═══ University Cards ═══ */
.uni-shape-wrap {
    position: relative;
    padding: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.uni-shape-wrap:hover { transform: translateY(-10px) scale(1.01); }

.uni-shape-inner {
    background: var(--bg-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* ── Shapes ── */
.uni-shape-tech { background: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6); clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px); }
.uni-shape-tech .uni-shape-inner { clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px); }
.uni-shape-tech:hover { filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.6)); }

.uni-shape-arts { background: linear-gradient(135deg, #ec4899, #a855f7, #f59e0b); clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 40px)); }
.uni-shape-arts .uni-shape-inner { clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 40px)); }
.uni-shape-arts:hover { filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6)); }

.uni-shape-diplomacy { background: linear-gradient(135deg, #c5a059, #f59e0b, #16a34a); clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%); }
.uni-shape-diplomacy .uni-shape-inner { clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%); }
.uni-shape-diplomacy:hover { filter: drop-shadow(0 0 20px rgba(197, 160, 89, 0.7)); }

.uni-shape-medicine { background: linear-gradient(135deg, #ef4444, #f97316, #ec4899); clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%, 0 20px); }
.uni-shape-medicine .uni-shape-inner { clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%, 0 20px); }
.uni-shape-medicine:hover { filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.6)); }

.uni-shape-business { background: linear-gradient(135deg, #10b981, #06b6d4); clip-path: polygon(20px 0, 100% 0, calc(100% - 20px) 100%, 0 100%); }
.uni-shape-business .uni-shape-inner { clip-path: polygon(20px 0, 100% 0, calc(100% - 20px) 100%, 0 100%); }
.uni-shape-business:hover { filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.6)); }

.uni-shape-default { background: linear-gradient(135deg, #6366f1, #a855f7); clip-path: polygon(0 0, calc(100% - 35px) 0, 100% 35px, 100% 100%, 0 100%); }
.uni-shape-default .uni-shape-inner { clip-path: polygon(0 0, calc(100% - 35px) 0, 100% 35px, 100% 100%, 0 100%); }
.uni-shape-default:hover { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.6)); }

.uni-shape-default::after { content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 35px 35px 0; border-color: transparent rgba(99, 102, 241, 0.9) transparent transparent; z-index: 20; }

/* ── Image Area ── */
.uni-img-area { position: relative; height: 200px; overflow: hidden; flex-shrink: 0; }
.uni-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.uni-shape-wrap:hover .uni-img { transform: scale(1.06); }

.uni-rank-badge {
    position: absolute; top: 0.75rem; right: 0.75rem;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
    color: white; padding: 0.2rem 0.6rem; border-radius: 20px;
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em;
}

/* ── Panel ── */
.uni-panel {
    flex: 1;
    padding: 1.25rem 1.5rem 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.uni-panel::before {
    content: '';
    position: absolute;
    top: -18px; left: 0; right: 0;
    height: 20px;
    background: var(--bg-card);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.uni-panel-tech { background: linear-gradient(180deg, rgba(6, 182, 212, 0.06) 0%, transparent 40%); border-top: 2px solid rgba(6, 182, 212, 0.4); }
.uni-panel-arts { background: linear-gradient(180deg, rgba(168, 85, 247, 0.07) 0%, transparent 40%); border-top: 2px solid rgba(168, 85, 247, 0.4); }
.uni-panel-diplomacy { background: linear-gradient(180deg, rgba(197, 160, 89, 0.08) 0%, transparent 40%); border-top: 2px solid rgba(197, 160, 89, 0.5); }
.uni-panel-medicine { background: linear-gradient(180deg, rgba(239, 68, 68, 0.06) 0%, transparent 40%); border-top: 2px solid rgba(239, 68, 68, 0.4); }
.uni-panel-business { background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, transparent 40%); border-top: 2px solid rgba(16, 185, 129, 0.4); }
.uni-panel-default { background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, transparent 40%); border-top: 2px solid rgba(99, 102, 241, 0.4); }

[data-theme="dark"] .uni-panel-tech { background: linear-gradient(180deg, rgba(6, 182, 212, 0.1) 0%, transparent 40%); }
[data-theme="dark"] .uni-panel-arts { background: linear-gradient(180deg, rgba(168, 85, 247, 0.1) 0%, transparent 40%); }
[data-theme="dark"] .uni-panel-diplomacy { background: linear-gradient(180deg, rgba(197, 160, 89, 0.12) 0%, transparent 40%); }
[data-theme="dark"] .uni-panel-medicine { background: linear-gradient(180deg, rgba(239, 68, 68, 0.1) 0%, transparent 40%); }
[data-theme="dark"] .uni-panel-business { background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, transparent 40%); }
[data-theme="dark"] .uni-panel-default { background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, transparent 40%); }

/* ── Tags ── */
.uni-tag { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.75rem; border-radius: 8px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.5rem; }
.uni-panel-tech .uni-tag { background: rgba(6,182,212,0.15); color: #06b6d4; border: 1px solid rgba(6,182,212,0.4); }
.uni-panel-arts .uni-tag { background: rgba(168,85,247,0.15); color: #a855f7; border: 1px solid rgba(168,85,247,0.4); }
.uni-panel-diplomacy .uni-tag { background: rgba(197,160,89,0.15); color: #c5a059; border: 1px solid rgba(197,160,89,0.5); }
.uni-panel-medicine .uni-tag { background: rgba(239,68,68,0.12); color: #ef4444; border: 1px solid rgba(239,68,68,0.4); }
.uni-panel-business .uni-tag { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.4); }
.uni-panel-default .uni-tag { background: rgba(99,102,241,0.12); color: #6366f1; border: 1px solid rgba(99,102,241,0.4); }

.uni-name { margin: 0.2rem 0 0; font-size: 1rem; font-weight: 800; font-family: 'Outfit', sans-serif; line-height: 1.3; color: var(--text-main); }
.uni-location { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.uni-stats { display: flex; gap: 1rem; margin-top: 0.5rem; }
.uni-stat { flex: 1; background: var(--bg-primary); padding: 0.5rem 0.75rem; border-radius: 8px; text-align: center; }
.uni-stat-label { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.uni-stat-val { display: block; font-weight: 900; font-size: 1.05rem; margin-top: 0.1rem; }

.uni-actions { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
.uni-actions-pos-top { margin-top: 0.35rem; }
.uni-actions-pos-mid { margin-top: 0.85rem; }
.uni-actions-pos-bot { margin-top: auto; padding-top: 0.5rem; }

/* Diplomacy: stacked V-shape matching card */
.uni-actions-diplomacy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 0.75rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-radius: 0;
}
.uni-panel-diplomacy .uni-btn-explore {
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #c5a059, #f59e0b); color: #1a1200; border: none;
    clip-path: none;
    padding: 0.65rem 0.75rem 0.65rem;
    border-radius: 0;
}
.uni-panel-diplomacy .uni-btn-compare {
    width: 100%;
    border: 1.5px solid rgba(197,160,89,0.5); color: #c5a059; font-size: 0.9rem;
    clip-path: none;
    padding: 0.5rem 0.75rem 0.65rem;
    background: transparent;
    border-radius: 0;
}
.uni-panel-diplomacy .uni-btn-compare:hover { background: rgba(197,160,89,0.1); }

/* ── Per-theme button shapes ── */
/* Tech — octagon */
.uni-panel-tech .uni-btn-explore {
    background: linear-gradient(135deg, #06b6d4, #3b82f6); color: white; border: none;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}
.uni-panel-tech .uni-btn-compare {
    border: 1.5px solid rgba(6,182,212,0.5); color: #06b6d4;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}
.uni-panel-tech .uni-btn-compare:hover { background: rgba(6,182,212,0.1); }

/* Arts — diagonal cut (top-right + bottom-left) */
.uni-panel-arts .uni-btn-explore {
    background: linear-gradient(135deg, #a855f7, #ec4899); color: white; border: none;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.uni-panel-arts .uni-btn-compare {
    border: 1.5px solid rgba(168,85,247,0.5); color: #a855f7;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.uni-panel-arts .uni-btn-compare:hover { background: rgba(168,85,247,0.1); }

/* Diplomacy — pointed bottom V (removed, now handled by .uni-actions-diplomacy above) */

/* Medicine — cut corners (top-left + top-right) */
.uni-panel-medicine .uni-btn-explore {
    background: linear-gradient(135deg, #ef4444, #f97316); color: white; border: none;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
}
.uni-panel-medicine .uni-btn-compare {
    border: 1.5px solid rgba(239,68,68,0.5); color: #ef4444;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
}
.uni-panel-medicine .uni-btn-compare:hover { background: rgba(239,68,68,0.1); }

/* Business — parallelogram skew */
.uni-panel-business .uni-btn-explore {
    background: linear-gradient(135deg, #10b981, #06b6d4); color: white; border: none;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.uni-panel-business .uni-btn-compare {
    border: 1.5px solid rgba(16,185,129,0.5); color: #10b981;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.uni-panel-business .uni-btn-compare:hover { background: rgba(16,185,129,0.1); }

/* Default — angled top-right corner */
.uni-panel-default .uni-btn-explore {
    background: linear-gradient(135deg, #6366f1, #a855f7); color: white; border: none;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.uni-panel-default .uni-btn-compare {
    border: 1.5px solid rgba(99,102,241,0.5); color: #6366f1;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.uni-panel-default .uni-btn-compare:hover { background: rgba(99,102,241,0.1); }

.uni-btn-explore { flex: 2; text-align: center; text-decoration: none; font-weight: 700; font-size: 0.85rem; padding: 0.55rem 0.75rem; border-radius: 8px; background: var(--primary-color); color: white; border: none; cursor: pointer; transition: all 0.2s; }
.uni-btn-explore:hover { filter: brightness(1.1); transform: translateY(-1px); }
.uni-btn-compare { flex: 1; padding: 0.55rem; border-radius: 8px; border: 1px solid var(--border-color); background: transparent; cursor: pointer; font-size: 1rem; transition: all 0.2s; color: var(--text-main); }
.uni-btn-compare:hover { background: rgba(var(--primary-rgb), 0.1); }

/* ── Fallback Logo ── */
.uni-fallback { width: 100%; display: flex; align-items: center; justify-content: center; font-size: 6rem; font-weight: 900; color: white; letter-spacing: -2px; position: relative; overflow: hidden; }
.uni-fallback::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.12), transparent 65%); }
.uni-fallback .uni-grid { position: absolute; inset: 0; opacity: 0.06; background-image: linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px); background-size: 24px 24px; }

.uni-fallback-tech { background: linear-gradient(135deg, #0f172a, #0c4a6e, #0e7490); }
.uni-fallback-arts { background: linear-gradient(135deg, #1e1b4b, #4c1d95, #7c3aed); }
.uni-fallback-diplomacy { background: linear-gradient(135deg, #0f2010, #14532d, #166534); }
.uni-fallback-medicine { background: linear-gradient(135deg, #1a0a0a, #7f1d1d, #b91c1c); }
.uni-fallback-business { background: linear-gradient(135deg, #022c22, #065f46, #047857); }
.uni-fallback-default { background: linear-gradient(135deg, #1e1b4b, #3730a3, #4f46e5); }

/* ── Theme cards ── */
.uni-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; z-index: 10; border-radius: 0; }
.uni-card:hover { transform: translateY(-10px); }

.uni-theme-tech { border: 2px solid rgba(6, 182, 212, 0.6) !important; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0), inset 0 0 40px rgba(6, 182, 212, 0.04); }
.uni-theme-tech::before { background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6); }
.uni-theme-tech:hover { box-shadow: 0 24px 60px rgba(6, 182, 212, 0.25), 0 0 0 1px rgba(6, 182, 212, 0.4) !important; border-color: rgba(6, 182, 212, 0.9) !important; }
.uni-theme-tech .uni-fallback { background: linear-gradient(135deg, #0f172a 0%, #0c4a6e 50%, #083344 100%); }
.uni-theme-tech .uni-tag { background: rgba(6, 182, 212, 0.15); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.4); }

.uni-theme-arts { border: 2px solid rgba(168, 85, 247, 0.6) !important; box-shadow: inset 0 0 40px rgba(168, 85, 247, 0.04); }
.uni-theme-arts::before { background: linear-gradient(90deg, #ec4899, #a855f7, #f59e0b); }
.uni-theme-arts:hover { box-shadow: 0 24px 60px rgba(168, 85, 247, 0.25), 0 0 0 1px rgba(168, 85, 247, 0.4) !important; border-color: rgba(168, 85, 247, 0.9) !important; }
.uni-theme-arts .uni-fallback { background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #7c3aed 100%); }
.uni-theme-arts .uni-tag { background: rgba(168, 85, 247, 0.15); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.4); }

.uni-theme-diplomacy { border: 2px solid rgba(197, 160, 89, 0.7) !important; box-shadow: inset 0 0 40px rgba(197, 160, 89, 0.05); }
.uni-theme-diplomacy::before { background: linear-gradient(90deg, #c5a059, #f59e0b, #16a34a); }
.uni-theme-diplomacy:hover { box-shadow: 0 24px 60px rgba(197, 160, 89, 0.3), 0 0 0 1px rgba(197, 160, 89, 0.5) !important; border-color: rgba(197, 160, 89, 1) !important; }
.uni-theme-diplomacy .uni-fallback { background: linear-gradient(135deg, #0f2010 0%, #14532d 50%, #166534 100%); }
.uni-theme-diplomacy .uni-tag { background: rgba(197, 160, 89, 0.15); color: #c5a059; border: 1px solid rgba(197, 160, 89, 0.5); }

.uni-theme-medicine { border: 2px solid rgba(239, 68, 68, 0.55) !important; box-shadow: inset 0 0 40px rgba(239, 68, 68, 0.04); }
.uni-theme-medicine::before { background: linear-gradient(90deg, #ef4444, #f97316, #ec4899); }
.uni-theme-medicine:hover { box-shadow: 0 24px 60px rgba(239, 68, 68, 0.22), 0 0 0 1px rgba(239, 68, 68, 0.4) !important; border-color: rgba(239, 68, 68, 0.9) !important; }
.uni-theme-medicine .uni-fallback { background: linear-gradient(135deg, #1a0a0a 0%, #7f1d1d 50%, #991b1b 100%); }
.uni-theme-medicine .uni-tag { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }

.uni-theme-business { border: 2px solid rgba(16, 185, 129, 0.55) !important; box-shadow: inset 0 0 40px rgba(16, 185, 129, 0.04); }
.uni-theme-business::before { background: linear-gradient(90deg, #10b981, #06b6d4, #3b82f6); }
.uni-theme-business:hover { box-shadow: 0 24px 60px rgba(16, 185, 129, 0.22), 0 0 0 1px rgba(16, 185, 129, 0.4) !important; border-color: rgba(16, 185, 129, 0.9) !important; }
.uni-theme-business .uni-fallback { background: linear-gradient(135deg, #022c22 0%, #065f46 50%, #047857 100%); }
.uni-theme-business .uni-tag { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); }

.uni-theme-default { border: 2px solid rgba(99, 102, 241, 0.5) !important; box-shadow: inset 0 0 40px rgba(99, 102, 241, 0.04); }
.uni-theme-default::before { background: linear-gradient(90deg, #6366f1, #a855f7); }
.uni-theme-default:hover { box-shadow: 0 24px 60px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(99, 102, 241, 0.4) !important; border-color: rgba(99, 102, 241, 0.9) !important; }
.uni-theme-default .uni-fallback { background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #4f46e5 100%); }
.uni-theme-default .uni-tag { background: rgba(99, 102, 241, 0.12); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.4); }

/* ═══ Form Error Messages ═══ */
.form-error-nonfield {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #b91c1c;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}
.form-error-field {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
[data-theme="dark"] .form-error-nonfield {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
[data-theme="dark"] .form-error-field {
    color: #fca5a5;
}

/* ═══ Hamburger Menu ═══ */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 200;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ═══ Mobile Responsive ═══ */
@media (max-width: 1024px) {
    .container { padding: 0 1rem; }

    .nav-hamburger { display: flex; }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 1.5rem 2rem;
        gap: 0;
        z-index: 150;
        overflow-y: auto;
    }
    .nav-links.mobile-open { display: flex; }

    .nav-links .nav-link,
    .nav-links .dropdown-trigger {
        padding: 0.85rem 0;
        font-size: 1.05rem;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        padding: 0 0 0 1rem;
        min-width: 0;
        display: none;
    }
    .nav-dropdown.open .dropdown-menu { display: block; }
    .nav-dropdown::after { display: none; }

    .navbar .nav-content > div:not(.nav-links):not(.nav-hamburger) {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-card);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border-color);
        padding: 0.75rem 1rem;
        justify-content: center;
        gap: 1.25rem;
        z-index: 100;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    }

    body { padding-bottom: 4rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.05rem !important; }

    .container { padding: 0 0.85rem; }

    footer > .container > div[style*="grid-template-columns: 2fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    footer > .container > div:last-child {
        flex-direction: column !important;
        gap: 0.75rem !important;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 0.75rem; }
}

/* ═══ Universal Grid Collapse ═══ */
@media (max-width: 768px) {
    [style*="grid-template-columns: repeat(2"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns: repeat(3"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns: repeat(4"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns: repeat(5"] { grid-template-columns: repeat(2, 1fr) !important; }
    [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns: 1fr 340px"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns: 2fr 1fr 1fr"] { grid-template-columns: 1fr !important; }

    [style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
}
