/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #fafafa;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* Header and Navigation */
header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 300;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 4px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: #2c3e50;
    transition: all 0.3s ease;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.intro {
    text-align: center;
    margin-bottom: 4rem;
}

.tagline {
    font-size: 1.25rem;
    font-style: italic;
    color: #666;
    font-weight: 300;
}

/* Glossary Container */
.glossary-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.glossary-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    touch-action: pan-y;
}

/* Glossary Terms */
.term {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateX(100%);
}

.term.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translateX(0);
}

.term.prev {
    transform: translateX(-100%);
}

.term-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: block;
}

.term-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    text-align: center;
}

.term-type {
    font-size: 1rem;
    font-style: italic;
    color: #888;
    margin-bottom: 1.5rem;
    text-align: center;
}

.term-definition {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #444;
    font-weight: 300;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Intro Card */
.intro-card .intro-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

.intro-card .intro-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #444;
    font-weight: 300;
    text-align: center;
    margin-bottom: 1.5rem;
}

.intro-card .intro-content p:last-child {
    margin-bottom: 0;
}

.swipe-hint {
    color: #888;
    font-style: italic;
    margin-top: 2rem !important;
}

/* Navigation Controls */
.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.nav-btn {
    background: none;
    border: 1px solid #ddd;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    background: none;
    color: #2c3e50;
    border-color: #ddd;
}

.counter {
    font-size: 1rem;
    color: #888;
    min-width: 60px;
    text-align: center;
}

/* Progress Dots */
.progress-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background-color: #2c3e50;
}

.dot:hover {
    background-color: #888;
}

/* View All Link */
.view-all-link {
    text-align: center;
    margin-top: 1.5rem;
}

.view-all-link a {
    font-size: 0.9rem;
    color: #888;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.view-all-link a:hover {
    color: #2c3e50;
    border-bottom-color: #2c3e50;
    opacity: 1;
}

/* All Terms Page */
.all-terms-header {
    text-align: center;
    margin-bottom: 3rem;
}

.all-terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.term-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.term-card:hover {
    border-color: #2c3e50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.term-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: block;
}

.term-card-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.term-card-type {
    font-size: 0.9rem;
    font-style: italic;
    color: #888;
    margin-bottom: 1rem;
}

.term-card-definition {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    font-weight: 300;
}

.back-link {
    text-align: center;
    margin-top: 2rem;
}

.back-link a {
    font-size: 0.9rem;
    color: #888;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.back-link a:hover {
    color: #2c3e50;
    border-bottom-color: #2c3e50;
    opacity: 1;
}

/* About and Suggest Pages */
.page-content {
    max-width: 700px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-align: center;
}

.page-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #444;
}

.credits {
    margin-top: 3rem !important;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.95rem !important;
    color: #666 !important;
    text-align: center;
}

.credits a {
    color: #2c3e50;
    text-decoration: underline;
    text-decoration-color: #ddd;
}

.credits a:hover {
    text-decoration-color: #2c3e50;
}

/* Form Styles */
.suggestion-form,
.submission-form {
    max-width: 600px;
    margin: 3rem auto;
}

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

.form-group label {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

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

.submit-btn {
    background-color: #2c3e50;
    color: #fff;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-family: 'Georgia', 'Times New Roman', serif;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #1a252f;
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    color: #888;
    font-weight: 300;
}

.footer-about-link {
    display: none;
    margin-top: 0.5rem;
}

.footer-about-link a {
    color: #2c3e50;
    text-decoration: underline;
    text-decoration-color: #ddd;
}

.footer-about-link a:hover {
    text-decoration-color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1.5rem;
        position: relative;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        border-bottom: 1px solid #e0e0e0;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .container {
        padding: 0 1.5rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .term-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .term-title {
        font-size: 2rem;
    }

    .term-definition {
        font-size: 1.1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .navigation {
        gap: 1.5rem;
    }

    .footer-about-link {
        display: block;
    }

    .all-terms-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .term-card {
        padding: 1.5rem 1rem;
    }

    .term-card-icon {
        width: 60px;
        height: 60px;
    }

    .term-card-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .term-icon {
        width: 80px;
        height: 80px;
    }

    .term-title {
        font-size: 1.75rem;
    }

    .term-definition {
        font-size: 1rem;
    }

    .intro {
        margin-bottom: 2.5rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .navigation {
        gap: 1rem;
    }
}
