:root {
    --dark: #0a0c0f;
    --dark2: #1e1f24;
    --dark3: #2c2e33;
    --dark4: #3a3c42;
    --gray: #6b6e77;
    --light: #e8e9ed;
    --light2: #f2f3f7;
    --blue: #4098d0;
    --blue2: #5fa7d9;
    --blue3: #2277aa;
    --shadow: 0 15px 35px -10px rgba(0,0,0,0.5);
    --shadow2: 0 5px 15px rgba(0,0,0,0.3);
    --radius: 20px;
    --radius-sm: 14px;
    --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font);
    background: linear-gradient(145deg, #0b0d10, #14161a);
    color: var(--light);
    line-height: 1.4;
    letter-spacing: 0.2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 12px;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1300px;
    width: 100%;
    background: linear-gradient(165deg, var(--dark) 0%, var(--dark2) 100%);
    border-radius: 28px;
    box-shadow: var(--shadow);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(2px);
}

/* ========== HEADER ========== */
.header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(10,12,15,0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 28px 28px 0 0;
    position: relative;
}

.header-info {
    margin-bottom: 20px;
}

.title-block {
    position: relative;
    margin-bottom: 10px;
}

.main-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #ffffff, #b0b7c5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: glow 8s infinite alternate;
    line-height: 1.3;
}

.title-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), transparent);
    border-radius: 3px;
    margin-top: 3px;
    animation: line-expand 1.5s ease-out;
}

.faculty-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.faculty-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #b8c1d1;
    padding: 6px 16px;
    background: rgba(64, 152, 208, 0.12);
    border-radius: 30px;
    border: 1px solid rgba(64, 152, 208, 0.3);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* ========== NAV ========== */
.nav {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: #a0a7b5;
    font-weight: 500;
    font-size: 1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue), #88c0ff);
    transition: width 0.25s ease;
}

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

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

/* ========== BURGER MENU ========== */
.burger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: absolute;
    top: 25px;
    right: 20px;
    z-index: 100;
}

.burger-btn span {
    width: 24px;
    height: 2.5px;
    background: var(--light);
    border-radius: 3px;
    transition: var(--transition);
}

/* ========== MAIN ========== */
.main {
    flex: 1;
    padding: 20px;
}

.section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.35s ease;
}

.section.active-section {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fade-in 0.4s ease;
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.section-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 600px) {
    .section-head {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.section-head h2 {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #c0c8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

/* ========== STATS ========== */
.stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    background: rgba(64, 152, 208, 0.1);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(64, 152, 208, 0.25);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-num {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--blue2);
}

.stat-label {
    font-size: 0.85rem;
    color: #a0a7b5;
    font-weight: 500;
}

/* ========== SEARCH ========== */
.search-block {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(20, 22, 27, 0.8);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    color: var(--light);
    font-size: 0.95rem;
    font-family: var(--font);
    backdrop-filter: blur(12px);
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: rgba(64, 152, 208, 0.5);
    box-shadow: 0 0 0 3px rgba(64, 152, 208, 0.08);
    background: rgba(25, 28, 33, 0.9);
}

.search-input::placeholder {
    color: #6b6e77;
}

.search-clear {
    position: absolute;
    right: 12px;
    background: rgba(64, 152, 208, 0.2);
    border: 1px solid rgba(64, 152, 208, 0.3);
    color: var(--blue2);
    padding: 6px 14px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font);
    transition: var(--transition);
}

.search-clear:hover {
    background: rgba(64, 152, 208, 0.35);
    color: white;
}

.search-count {
    font-size: 0.85rem;
    color: #8e97a4;
    padding-left: 4px;
}

/* ========== GROUP CARDS ========== */
.group-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 600px) {
    .group-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .group-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.group-card {
    background: linear-gradient(145deg, #1a1d23, #15181d);
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--blue3));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.group-card:hover::before {
    transform: scaleX(1);
}

.group-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(64, 152, 208, 0.5);
    box-shadow: 0 15px 25px rgba(34, 119, 170, 0.2);
    background: linear-gradient(145deg, #1e2128, #191c22);
}

.group-name {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--blue2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-info {
    color: #ccd2dc;
    font-size: 0.95rem;
    margin-bottom: 14px;
    line-height: 1.5;
    opacity: 0.8;
}

.group-link {
    color: #959ead;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.3);
    padding: 6px 12px;
    border-radius: 25px;
    width: fit-content;
    transition: var(--transition);
}

.group-card:hover .group-link {
    color: var(--blue2);
    background: rgba(64, 152, 208, 0.15);
}

/* ========== EMPTY RESULT ========== */
.empty-result {
    text-align: center;
    padding: 40px 20px;
}

.empty-inner {
    background: rgba(20, 22, 27, 0.6);
    border-radius: 18px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.04);
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #a0a7b5;
    margin-bottom: 8px;
}

.empty-text {
    color: #6b6e77;
    font-size: 0.9rem;
}

/* ========== NEWS ========== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    background: rgba(30, 32, 38, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 5px solid var(--blue);
    transition: var(--transition);
}

.news-item:hover {
    background: rgba(40, 44, 52, 0.8);
    border-left-color: #88c0ff;
    transform: translateX(3px);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.news-date {
    font-size: 0.8rem;
    color: #959ead;
    font-weight: 500;
}

.news-tag {
    font-size: 0.75rem;
    color: var(--blue2);
    background: rgba(64, 152, 208, 0.15);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.news-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #e8ecf2;
    margin-bottom: 8px;
}

.news-text {
    color: #c8d0dc;
    font-size: 0.93rem;
    line-height: 1.5;
}

/* ========== FOOTER ========== */
.footer {
    padding: 20px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 0 0 28px 28px;
}

.footer-main {
    text-align: center;
    margin-bottom: 12px;
}

.footer-main p {
    color: #8e97a4;
    font-size: 0.9rem;
}

.footer-divider {
    width: 40px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 8px auto;
}

.footer-sub {
    font-size: 0.8rem;
    opacity: 0.7;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #6b6e77;
}

.footer-dot {
    opacity: 0.5;
}

/* ========== UTILITY ========== */
.hidden {
    display: none !important;
}

/* ========== ANIMATIONS ========== */
@keyframes glow {
    0% { opacity: 0.9; text-shadow: 0 0 5px rgba(64,152,208,0.1); }
    100% { opacity: 1; text-shadow: 0 0 15px rgba(64,152,208,0.3); }
}

@keyframes line-expand {
    0% { width: 0; opacity: 0; }
    100% { width: 80px; opacity: 1; }
}

/* ========== MOBILE ========== */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .container {
        border-radius: 20px;
    }
    
    .header {
        padding: 16px 16px 12px;
        border-radius: 20px 20px 0 0;
    }
    
    .main-title {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .faculty-name {
        font-size: 0.9rem;
        padding: 4px 12px;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding-bottom: 6px;
    }
    
    .section-head h2 {
        font-size: 1.5rem;
    }
    
    .group-card {
        padding: 15px;
    }
    
    .group-name {
        font-size: 1.1rem;
    }
    
    .footer {
        padding: 16px;
        font-size: 0.85rem;
    }
    
    .burger-btn {
        display: flex;
        top: 20px;
        right: 16px;
    }
    
    .nav {
        display: none;
        flex-direction: column;
        gap: 10px;
    }
    
    .nav.open {
        display: flex;
        background: rgba(10,12,15,0.95);
        backdrop-filter: blur(20px);
        padding: 15px;
        border-radius: 16px;
        margin-top: 15px;
    }
}

@media (min-width: 481px) {
    .burger-btn {
        display: none;
    }
    
    .nav {
        display: flex;
    }
}

@media (max-width: 360px) {
    .main-title {
        font-size: 1rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 8px;
    }
}