:root {
    --primary-color: #0078D4;
    --primary-gradient: linear-gradient(135deg, #0078D4, #00a8ff);
    --link-color: #0066cc;
    --link-hover: #004499;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 8px 24px rgba(0, 120, 212, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.2)), url('background1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3 {
    margin: 0.5em 0;
    font-weight: 600;
}

h1 { 
    font-size: 2em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 { 
    font-size: 1.3em;
    margin: 0;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.link-section:hover h2::after {
    width: 100%;
}

h3 { font-size: 1.2em; }

a {
    color: var(--link-color);
    text-decoration: none;
    margin-right: 10px;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--link-hover);
    text-decoration: none;
}

.title {
    text-align: center;
    animation: fadeInDown 0.8s ease;
}

.nav-links {
    text-align: center;
    margin: 1em 0;
    animation: fadeIn 1s ease;
}

.nav-links a {
    display: inline-block;
    margin: 5px 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: white;
}

.highlight-link {
    background: linear-gradient(135deg, #ff6b6b, #ffa500) !important;
    color: white !important;
    border-color: #ff6b6b !important;
    font-weight: 700 !important;
}

.highlight-link:hover {
    background: linear-gradient(135deg, #ff5252, #ff8c00) !important;
    transform: translateY(-3px) scale(1.05);
}

.search-container {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 600px;
    border-radius: 40px;
    box-shadow: var(--shadow);
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.search-form:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.search-form select {
    padding: 16px 12px;
    font-size: 16px;
    border: none;
    border-right: 1px solid #eee;
    outline: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    font-weight: 500;
}

.search-form select:hover {
    background: rgba(0, 120, 212, 0.05);
}

.search-form input {
    flex: 1;
    padding: 16px 24px;
    font-size: 18px;
    border: none;
    outline: none;
}

.search-form button {
    padding: 0 28px;
    font-size: 18px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-form button:hover {
    background: linear-gradient(135deg, #0066b8, #0097e6);
    transform: scale(1.05);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 4px auto 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
    z-index: 1000;
}

.search-suggestions.active {
    display: block;
}

.search-suggestions .suggestion-item {
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestions .suggestion-item:hover,
.search-suggestions .suggestion-item.selected {
    background: rgba(0, 120, 212, 0.1);
    color: var(--primary-color);
}

.search-container {
    position: relative;
}

.link-section {
    background: rgba(255, 255, 255, 0.25);
    padding: 12px 16px;
    padding-top: 10px;
    border-radius: 12px;
    margin: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease backwards;
    backdrop-filter: blur(4px);
    overflow: hidden;
}

.link-section .link-grid {
    max-height: 2000px;
    opacity: 1;
    overflow: visible;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.link-section:hover {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.link-section:nth-child(1) { animation-delay: 0.1s; }
.link-section:nth-child(2) { animation-delay: 0.2s; }
.link-section:nth-child(3) { animation-delay: 0.3s; }
.link-section:nth-child(4) { animation-delay: 0.4s; }

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.link-grid a {
    display: block;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.95em;
}

.link-grid a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 120, 212, 0.1), transparent);
    transition: left 0.5s ease;
}

.link-grid a:hover::before {
    left: 100%;
}

.link-grid a:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    body { padding: 10px; }
    h1 { font-size: 1.5em; }
    .search-form { flex-direction: column; border-radius: 8px; }
    .search-form input { border-radius: 8px 8px 0 0; }
    .search-form button { padding: 12px; border-radius: 0 0 8px 8px; }
    .link-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .nav-links a { padding: 8px 16px; margin: 3px 6px; }
}
