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

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: #F9FAFB;
    color: #1F2937;
    padding-top: 80px;
    line-height: 1.6;
}

header {
    background-color: #FFFFFF;
    padding: 16px 24px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #1E3A8A;
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    margin-top: 12px;
}

nav ul li {
    margin: 0 16px;
}

nav ul li a {
    color: #1F2937;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #3B82F6;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: #1F2937;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.dropbtn:hover {
    color: #3B82F6;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #FFFFFF;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown-content a {
    color: #1F2937;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #EFF6FF;
    color: #3B82F6;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}

section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px;
}

.hero {
    text-align: center;
    padding: 96px 24px 64px;
    background-color: #F9FAFB;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1E3A8A;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.125rem;
    color: #4B5563;
    max-width: 600px;
    margin: 0 auto 24px;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1E3A8A;
    text-align: center;
    margin-bottom: 32px;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.research-item {
    background-color: #FFFFFF;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.research-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 12px;
}

.research-item p {
    font-size: 1rem;
    color: #4B5563;
    margin-bottom: 16px;
}

.research-item a {
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.research-item a:hover {
    color: #1E3A8A;
}

button {
    background-color: #3B82F6;
    color: #FFFFFF;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #1E3A8A;
    transform: translateY(-2px);
}

#playground {
    text-align: center;
    border-top: 1px solid #E5E7EB;
}

#collaborate p {
    font-size: 1.125rem;
    color: #4B5563;
    text-align: center;
    margin-bottom: 24px;
}

form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

form input,
form textarea {
    padding: 12px;
    margin: 8px 0;
    font-size: 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background-color: #FFFFFF;
    color: #1F2937;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form input:focus,
form textarea:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

form textarea {
    min-height: 120px;
    resize: vertical;
}

form button {
    padding: 12px;
    margin-top: 16px;
}

#algorithmDetails {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 32px;
}

#algorithmContent {
    padding: 24px;
    border-radius: 6px;
    background-color: #F9FAFB;
}

#algorithmContent h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 12px;
}

#algorithmContent p,
#algorithmContent ul {
    font-size: 1rem;
    color: #4B5563;
    margin-bottom: 12px;
}

#algorithmContent ul {
    list-style-type: disc;
    padding-left: 24px;
}

.code {
    background-color: #F3F4F6;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    color: #1F2937;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

footer {
    background-color: #FFFFFF;
    color: #4B5563;
    text-align: center;
    padding: 24px;
    border-top: 1px solid #E5E7EB;
}

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

@media (max-width: 768px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 8px 12px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 48px 16px;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    nav ul li a,
    .dropbtn {
        font-size: 0.875rem;
    }

    button {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}