:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --accent-color: #2c3e50;
    /* Dark Blue/Grey */
    --secondary-color: #7f8c8d;
    --link-color: #2980b9;
    --border-color: #eaeaea;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --container-width: 1100px;
    --spacing-unit: 1rem;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    /* Increased line-height */
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: -0.5px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    /* Increased gap */
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

.main-nav a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
}

/* Main Content */
.site-content {
    min-height: 80vh;
    padding: 4rem 0;
}

/* Footer */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

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

.footer-social {
    display: flex;
    gap: 1.5rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 6rem;
}

.hero h1 {
    font-size: 4rem;
    /* Larger hero text */
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Game Container */
.game-container {
    position: relative;
    width: 800px;
    height: 400px;
    margin: 0 auto 3rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: #fcfcfc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.game-message {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.game-controls {
    font-size: 1rem;
    color: var(--secondary-color);
}


.btn {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 6px;
    /* Rounded corners */
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color);
    min-width: 180px;
    text-align: center;
    margin-left: 1rem;
    margin-right: 1rem;
    margin-top: 1rem;
}

.btn:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* About Page & Timeline */
.about-section {
    margin-bottom: 5rem;
}

.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.col-title {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.timeline {
    position: relative;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%;
    margin-bottom: 2.5rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: auto;
    background-color: var(--bg-color);
    border: 3px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    left: 13px;
    transition: background-color 0.3s ease;
}

.timeline-item:hover::after {
    background-color: var(--accent-color);
}

.timeline-content {
    padding: 25px 35px;
    background-color: #fff;
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--link-color);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
}

.timeline-subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-style: italic;
}

/* Publications */
.publications-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.pub-list {
    list-style: none;
}

.pub-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--border-color);
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.pub-authors {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.pub-venue {
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-style: italic;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.post-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.post-content {
    padding: 2rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.post-summary {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.read-more {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--accent-color);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fcfcfc;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
    background-color: #fff;
}

textarea.form-control {
    min-height: 180px;
    resize: vertical;
}

/* Responsive */
@media (max-width: 850px) {
    .game-container {
        width: 100%;
        height: 300px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .two-col-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: 1rem;
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--accent-color);
        margin-bottom: 5px;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Game Controls UI */
.game-controls-ui {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 20;
    pointer-events: none;
}

.control-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.control-btn:active {
    background: rgba(44, 62, 80, 0.8);
    color: #fff;
}

@media (hover: none) and (pointer: coarse) {
    .game-controls-ui {
        display: flex;
    }

    .game-controls {
        display: none;
    }
}

/* Admin Panel */
.admin-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--accent-color);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    border: 1px solid var(--accent-color);
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background-color: #34495e;
    color: #fff;
}

.btn-danger {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.form-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.form-actions {
    display: flex;
    align-items: center;
}

/* Contact Page Responsive */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}