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

:root {
    --city-color: #3553bc;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: white;
    color: #000;
    margin: 0;
    padding: 0;
}

/* Typography */
.nav-logo {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 15px;
}

/* Text Styles */
.headline {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 26px;
}

.body {
    font-family: 'Merriweather', serif;
    font-size: 12px;
    line-height: 18px;
    color: #333;
}

.small-title {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    line-height: 16px;
}

/* Navbar Styles */
.navbar {
    background-color: white;
    width: 100%;
}

.nav-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 40px 40px 20px 40px;
    max-width: 720px;
    margin: 0 auto;
    background-color: #f5f5f5;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 292px;
    cursor: pointer;
}

.nav-button {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: #000;
}

.nav-button span {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    white-space: pre;
}

.nav-button.active span {
    font-weight: 800;
}

.nav-button:hover {
    opacity: 0.5;
}

.nav-secondary {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 10px;
    text-align: center;
}

.nav-secondary a {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    transition: text-decoration 0.2s;
}

.nav-secondary a:hover {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.nav-line {
    height: 0;
    width: 100%;
    border-top: 1px solid #000;
}

/* Main Container */
.main-container {
    background-color: white;
    min-height: calc(100vh - 200px);
    width: 100%;
}

/* Page Styles */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px;
    background-color: #f5f5f5;
}

/* Corpus Page Styles */
.corpus-page-content {
    background-color: #f5f5f5;
}

.corpus-intro {
    margin-bottom: 60px;
}

.corpus-intro p {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 26px;
    color: #000;
    margin: 0;
}

/* Contribute Page Intro */
.contribute-intro {
    max-width: 720px;
    margin: 0 auto 30px auto;
    padding: 0;
    background-color: #f5f5f5;
}

.contribute-intro p {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 26px;
    color: #000;
    margin: 0;
}

/* Write Page Styles */
.write-intro {
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
    background-color: #f5f5f5;
    min-height: calc(100vh - 200px);
}

.write-intro p {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 26px;
    color: #000;
    margin: 0 0 30px 0;
}

.email-signup {
    display: flex;
    gap: 10px;
    align-items: center;
}

.email-signup input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    background: white;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
}

.email-signup input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.email-signup button {
    padding: 12px 30px;
    background: #1a1a1a;
    color: white;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.email-signup button:hover {
    opacity: 0.8;
}

.video-preview {
    margin: 30px 0;
    width: 100%;
}

.video-preview video {
    width: 100%;
    height: auto;
}

.corpus-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.axo-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
}

.axo-item img {
    flex: 1;
    max-width: 50%;
    height: auto;
    display: block;
}

.axo-line {
    width: 40px;
    height: 1px;
    background-color: #000;
    flex-shrink: 0;
}

.axo-description {
    flex: 1;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

.axo-description h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #000;
}

.axo-description p {
    font-family: 'Merriweather', serif;
    font-size: 12px;
    line-height: 18px;
    color: #333;
    margin: 0 0 8px 0;
}

.axo-description p:last-child {
    margin-bottom: 0;
}

/* All Content */
.all-content {
    background-color: #f5f5f5;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
    padding: 30px;
}

/* Cities Sidebar */
.cities-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100px;
    flex-shrink: 0;
}

.city-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 150px;
}

.city-image {
    width: 100px;
    height: 100px;
    position: relative;
    overflow: hidden;
}

.city-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.city-name {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
    line-height: 16px;
}

/* Themes Column */
.themes-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 1;
}

.theme-card {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    width: 100%;
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.15);
    font-family: 'Merriweather', serif;
}

.theme-header {
    background-color: transparent;
    box-shadow: none;
}

.theme-featured {
    background-color: #3553bc;
    color: #fff;
}

.theme-featured .theme-subtitle {
    color: #fff;
}

.theme-title {
    font-size: 12px;
    line-height: 16px;
    min-height: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.theme-subtitle {
    font-family: 'Merriweather', serif;
    font-size: 10px;
    line-height: 14px;
    color: #333;
}

/* Resources Column */
.resources-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0;
}

.resources-text {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 26px;
    color: #000;
}

.resources-text .link-item {
    font-weight: 500;
    font-size: 15px;
}

.resources-text p {
    margin: 0;
}

.resources-text .highlight {
    color: #3553bc;
}

.add-content-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.add-button-container {
    margin-top: 40px;
    border: 2px dashed #1a1a1a;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    background: white;
}

.add-button-container:hover {
    background: #f9f9f9;
}

.add-button {
    font-size: 48px;
    font-weight: 300;
    color: #1a1a1a;
    line-height: 1;
}

/* Contribution Form */
.contribution-form {
    display: none;
    background: white;
    padding: 30px;
    margin-top: 30px;
    border: 2px dashed #1a1a1a;
}

.contribution-form.show {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    background-color: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a1a1a;
}

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

.char-counter {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: white;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.submit-btn:hover {
    opacity: 0.8;
}

.cancel-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: #1a1a1a;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 20px;
    }

    .nav-main {
        width: 100%;
        margin-bottom: 10px;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .page-content {
        padding: 0 20px;
    }

    .all-content {
        flex-direction: column;
        gap: 30px;
    }

    .cities-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
    }

    .city-item {
        min-width: 100px;
        flex-shrink: 0;
    }

    .themes-column,
    .resources-column {
        width: 100%;
    }

    /* Corpus page mobile layout */
    .corpus-layout {
        gap: 30px;
    }

    .axo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .axo-item img {
        max-width: 100%;
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .desktop-only {
        display: none !important;
    }

    .axo-description h3 {
        font-size: 11px;
        margin-bottom: 8px;
        text-align: center;
    }

    .axo-description p {
        font-size: 11px;
        line-height: 16px;
    }
}

/* Tooltip Styles */
.tooltip {
    position: fixed;
    background: white;
    border: 2px solid #1a1a1a;
    padding: 10px 12px;
    max-width: 280px;
    display: none;
    z-index: 1000;
    font-size: 10px;
    line-height: 1.5;
}

.tooltip.show {
    display: block;
}

.tooltip-date {
    color: #666;
    font-size: 9px;
    margin-bottom: 5px;
}

.tooltip-author {
    font-weight: 700;
    margin-bottom: 3px;
}

/* Link Item Styles */
.link-item {
    display: inline;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
    color: #000;
}

.link-item:hover {
    color: var(--city-color);
}

.link-item.highlight {
    color: var(--city-color);
}

.link-item.highlight:hover {
    opacity: 0.7;
}

.link-category {
    font-weight: 700;
}

.link-separator {
    font-weight: 700;
    margin: 0 4px;
    color: #000;
}

/* City Item Hover */
.city-item {
    cursor: pointer;
    transition: opacity 0.2s;
}

.city-item:hover {
    opacity: 0.7;
}

/* Theme Card Hover */
.theme-card {
    cursor: pointer;
    transition: all 0.2s;
}

.theme-card:hover {
    opacity: 0.7;
}

/* Add Button Hover */
.add-content-box {
    cursor: pointer;
    transition: background 0.2s;
}

.add-content-box:hover {
    background: #fafafa;
}

/* Auth Navigation */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link-secondary {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #000;
    text-decoration: none;
    text-transform: lowercase;
}

.nav-link-secondary:hover {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.nav-separator {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #000;
}

.nav-auth .user-name {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 400;
    text-transform: lowercase;
}

.nav-auth .logout-link {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #000;
    text-decoration: none;
    text-transform: lowercase;
    cursor: pointer;
}

.nav-auth .logout-link:hover {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

/* Update navbar line to dotted */
.nav-line {
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #000 0px,
        #000 1px,
        transparent 1px,
        transparent 4px
    );
}

/* Footer */
.footer {
    background-color: white;
    width: 100%;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 40px 40px 40px;
    max-width: 720px;
    margin: 0 auto;
    background-color: #f5f5f5;
}

.footer-line {
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #000 0px,
        #000 1px,
        transparent 1px,
        transparent 4px
    );
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.footer-links a {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #000;
    text-decoration: none;
    text-transform: lowercase;
}

.footer-links a:hover {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

/* Auth Page */
.auth-page-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    background-color: #f5f5f5;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-box {
    background: #f5f5f5;
    padding: 40px;
    border: 1px solid #ddd;
}

.auth-form h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: left;
}

.auth-form .form-group {
    margin-bottom: 15px;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    border: 1px solid #ddd;
    background: white;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: white;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-btn:hover {
    background: #333;
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #999;
}

.google-btn {
    width: 100%;
    padding: 14px;
    background: white;
    border: 1px solid #ddd;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}

.google-btn:hover {
    background: #f5f5f5;
}

.google-btn svg {
    flex-shrink: 0;
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: #666;
}

.auth-switch a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Account Page */
.account-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.account-container h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 30px 0;
}

.account-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #ddd;
}

.account-section:last-child {
    border-bottom: none;
}

.account-section label {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #666;
}

.account-section input {
    width: 100%;
    padding: 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    border: 1px solid #ddd;
    background: white;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.account-section input:read-only {
    background: #f5f5f5;
    color: #999;
}

.account-section input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.account-btn {
    padding: 10px 20px;
    background: #1a1a1a;
    color: white;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.account-btn:hover {
    background: #333;
}

.danger-zone {
    border-bottom-color: #ffebee;
}

.warning-text {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #999;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.danger-btn {
    background: #dc3545;
}

.danger-btn:hover {
    background: #c82333;
}

/* Notification */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #1a1a1a;
    color: white;
    padding: 15px 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    border-radius: 4px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 350px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notification.error {
    background: #dc3545;
}
