:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background Gradients/Blobs for modern look */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.container {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.app-header {
    text-align: center;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.app-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glassmorphism Cards */
.predictor-card, .results-section {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.predictor-card:hover {
    transform: translateY(-5px);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-main);
}

.form-group input {
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-predict {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    margin-top: 10px;
}

.btn-predict:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.btn-predict:active {
    transform: scale(0.98);
}

/* Results Section */
.hidden {
    display: none;
}

.rank-display {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
}

.rank-display h2 {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.rank-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 10px;
}

.rank-disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.branches-container h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.campus-group {
    margin-bottom: 30px;
}

.campus-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.campus-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}

.branch-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.branch-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    transition: transform 0.2s, background 0.2s;
}

.branch-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.branch-name {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.branch-cutoff {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.no-branches {
    color: #ef4444;
    font-style: italic;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.app-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 20px;
}

.app-footer code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .app-header h1 {
        font-size: 2rem;
    }
    .rank-value {
        font-size: 2.5rem;
    }
    .branch-list {
        grid-template-columns: 1fr;
    }
}
