@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #070b13;
    --bg-card: rgba(13, 20, 38, 0.6);
    --primary: #2B3B8B;          /* Al Baha Dark Blue */
    --primary-hover: #1f2a66;
    --accent: #1D9ED9;           /* Al Baha Light Blue */
    --accent-glow: rgba(29, 158, 217, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --star: #ffb800;
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'IBM Plex Sans Arabic', 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

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

/* Background Gradients */
.background-gradients {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    mix-blend-mode: screen;
}

.glow-1 {
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 158, 217, 0.3) 0%, transparent 70%);
    animation: float-slow 15s infinite alternate ease-in-out;
}

.glow-2 {
    bottom: -20%;
    left: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(43, 59, 139, 0.4) 0%, transparent 70%);
    animation: float-slow 18s infinite alternate-reverse ease-in-out;
}

@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 80px) scale(1.15); }
}

/* Navbar */
.navbar {
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 11, 19, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 18px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
}

/* Buttons */
.btn {
    padding: 12px 28px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #1583b5 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(29, 158, 217, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(29, 158, 217, 0.4);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: white;
    transform: translateY(-1px);
}

.navbar .btn-outline {
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.navbar .btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.btn-text:hover {
    color: var(--accent);
}

/* Typography & Visual Effects */
.text-gradient {
    background: linear-gradient(135deg, #ffffff 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-secondary {
    color: var(--text-muted);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 32px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Search Container */
.search-container {
    max-width: 850px;
    margin: 0 auto 60px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 32px;
    background: rgba(13, 20, 38, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4) !important;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.3rem;
    pointer-events: none;
    transition: color 0.3s;
}

.search-box input {
    width: 100%;
    padding: 20px 60px 20px 24px;
    background: rgba(7, 11, 19, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.search-box input:focus {
    outline: none;
    background: rgba(7, 11, 19, 0.7);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(29, 158, 217, 0.25);
}

.search-box input:focus + .search-icon {
    color: var(--accent);
}

.filters {
    display: flex;
    gap: 16px;
}

.glass-select {
    flex: 1;
    background: rgba(7, 11, 19, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: white;
    padding: 0 24px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 20px center;
    background-size: 18px;
    padding-left: 48px;
}

.glass-select:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(7, 11, 19, 0.7);
    box-shadow: 0 0 20px rgba(29, 158, 217, 0.25);
}

.glass-select option {
    background: #0d1426;
    color: white;
}

.filters .btn {
    flex-basis: 150px;
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 60px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 4px;
}

/* Main Content */
.main-content {
    padding-bottom: 120px;
}

.section-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 1.1rem;
}

.hidden {
    display: none !important;
}

/* Colleges Grid */
.colleges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.college-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 40px 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(13, 20, 38, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 20px;
}

.college-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(29, 158, 217, 0.08) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.college-card h3 {
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    transition: color 0.3s;
}

.college-card:hover {
    transform: translateY(-8px);
    border-color: rgba(29, 158, 217, 0.4) !important;
    background: rgba(13, 20, 38, 0.8) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4) !important;
}

.college-card:hover::before {
    opacity: 1;
}

.college-card:hover h3 {
    color: var(--accent);
}

.college-icon {
    font-size: 3.5rem;
    color: var(--accent) !important;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 10px rgba(29, 158, 217, 0.15));
}

.college-card:hover .college-icon {
    transform: scale(1.15) translateY(-4px);
    color: #ffffff !important;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

/* Results Grid & Prof Cards */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.prof-card {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(13, 20, 38, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
}

.prof-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(13, 20, 38, 0.85);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.prof-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(43, 59, 139, 0.25);
    transition: transform 0.3s;
}

.prof-card:hover .prof-avatar {
    transform: scale(1.05) rotate(3deg);
}

.prof-info {
    flex: 1;
}

.prof-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.prof-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.prof-rating .fa-star {
    color: var(--star);
    font-size: 0.95rem;
    filter: drop-shadow(0 0 4px rgba(255, 184, 0, 0.3));
}

.rating-number {
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
}

.no-results {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-muted);
    background: rgba(13, 20, 38, 0.3);
    border-radius: 24px;
    border: 1px dashed var(--glass-border);
}

.no-results i {
    font-size: 4.5rem;
    margin-bottom: 24px;
    color: var(--accent);
    opacity: 0.8;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.no-results p {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Modal Styling (High End Modern Glass Overlay) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 6, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 520px;
    position: relative;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 20px;
    left: 24px;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.prof-profile {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.prof-profile .prof-avatar {
    width: 80px;
    height: 80px;
    font-size: 2.2rem;
    border-radius: 22px;
}

.rating-action {
    text-align: center;
    padding: 10px 0;
}

.rating-action h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: white;
}

.rating-action p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 28px;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Animations */
.animate-fade-up {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Admin Panel Reviews Styling */
.admin-review-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
}

.admin-review-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(29, 158, 217, 0.2);
}

.admin-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-approved { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge-rejected { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 5px;
    flex-wrap: wrap;
}

/* Responsive fixes (Fully Optimized Mobile UX) */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }
    
    .nav-links a {
        margin: 0;
        font-size: 0.95rem;
    }

    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.3;
        padding: 0 10px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .search-container {
        padding: 20px 16px;
        margin-bottom: 40px;
        border-radius: 16px;
    }

    .search-box input {
        padding: 14px 48px 14px 16px;
        font-size: 0.95rem;
    }

    .search-icon {
        right: 18px;
        font-size: 1.1rem;
    }

    .filters {
        flex-direction: column;
        gap: 12px;
    }
    
    .glass-select {
        padding: 12px 16px 12px 36px;
        font-size: 0.95rem;
        background-position: left 15px center;
        background-size: 14px;
        border-radius: 12px;
        height: 48px;
        width: 100% !important;
        max-width: 100% !important;
    }

    .filters .btn {
        width: 100%;
        height: 48px;
        border-radius: 12px;
        font-size: 0.95rem;
    }
    
    .stats {
        gap: 24px;
        margin-top: 30px;
        flex-wrap: wrap;
    }
    
    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .section-header {
        margin-bottom: 25px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    .colleges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .college-card {
        padding: 25px 12px;
        border-radius: 16px;
    }

    .college-icon {
        font-size: 2.4rem;
        margin-bottom: 12px;
    }

    .college-card h3 {
        font-size: 1rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .prof-card {
        padding: 16px;
        border-radius: 16px;
        gap: 16px;
    }

    .prof-avatar {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
        border-radius: 14px;
    }

    .prof-info h3 {
        font-size: 1.05rem;
    }

    .rating-number {
        font-size: 0.85rem;
    }

    .prof-rating .fa-star {
        font-size: 0.85rem;
    }

    .modal-content {
        padding: 24px 16px;
        border-radius: 20px;
    }

    .prof-profile {
        gap: 16px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .prof-profile .prof-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .close-btn {
        top: 15px;
        left: 15px;
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .colleges-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }
}
