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

html, body {
    height: 100%;
    overflow: auto;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    letter-spacing: 0.05em;
}

.top-nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.top-nav-link {
    color: #000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.top-nav-link:hover {
    color: #8B0000;
}

.top-nav-link.active {
    color: #8B0000;
}

/* Hero Section */
.hero-section {
    background-color: #981b1f;
    color: #fff;
    padding: 2rem 2rem;
    margin-top: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    min-height: 150px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    position: relative;
}

.hero-title-text {
    flex-shrink: 0;
    white-space: nowrap;
    z-index: 1;
}

.hero-tree-left {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    height: 100px;
    width: auto;
    object-fit: contain;
    z-index: 0;
}

.hero-tree-right {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    height: 100px;
    width: auto;
    object-fit: contain;
    z-index: 0;
}

.hero-motto {
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    opacity: 0.95;
}

/* Main Content */
main {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    padding-bottom: 5rem;
    background-color: #fff;
    margin-top: 0;
}

.content-wrapper {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Connect member count */
.member-count-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.member-count-label {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.member-count-value {
    margin: 0.25rem 0 0;
    font-size: 2rem;
    font-weight: 700;
    color: #8B0000;
    line-height: 1.1;
}

/* Landing (non-expandable) boxes */
.landing-box {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    overflow: hidden;
}

.landing-box-inner {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
}

.landing-box-inner--reverse {
    grid-template-columns: 220px 1fr;
}

.landing-box-inner--no-media {
    grid-template-columns: 1fr;
}

.landing-box-inner--reverse .landing-box-media {
    grid-column: 1;
    grid-row: 1;
}

.landing-box-inner--reverse .landing-box-text {
    grid-column: 2;
    grid-row: 1;
}

.landing-box-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 1rem 0;
}

.landing-box-text {
    color: #333;
}

.landing-box--text-right .landing-box-text {
    text-align: center;
}

.landing-box-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}

.landing-box-text p:last-child {
    margin-bottom: 0;
}

.landing-box-text ul {
    margin-left: 1.5rem;
    margin-bottom: 0;
    color: #333;
}

.landing-box--text-right .landing-box-text ul {
    display: inline-block;
    text-align: left;
    margin: 0;
    padding-left: 1.5rem;
}

.landing-box--text-right .landing-box-text ul li {
    text-align: left;
}

.landing-box-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-box-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    object-fit: contain;
    opacity: 0.95;
}

.landing-box-image--small {
    max-width: 221px;
}

/* Expandable Sections */
.expandable-section {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.expandable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.expandable-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.expandable-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.expandable-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    color: #000;
    display: inline-block;
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 2rem;
}

.expandable-section.expanded .expandable-content {
    max-height: 2000px;
    padding: 0 2rem 2rem 2rem;
}

.expandable-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}

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

.expandable-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.expandable-content li {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Content Sections */
.content {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
    color: #000;
}

.content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: #000;
    line-height: 1.2;
}

.content h2:first-child {
    margin-top: 0;
}

.content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #000;
}

.content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}

.content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.content li {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Form Styles */
.form-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.form-section h2 {
    color: #8B0000;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.form-section .join-intro {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.form-section .join-benefits {
    margin: 0.35rem 0 2.75rem 0;
    padding-left: 0;
    list-style-position: inside;
    color: #333;
}

.form-section .join-benefits li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    padding-left: 0.15rem;
}

.form-section .join-benefits li:last-child {
    margin-bottom: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #000;
    display: block;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background-color: #fff;
    color: #000;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #8B0000;
    background-color: #fff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.hat-preview-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.hat-preview-image {
    height: 120px;
    width: auto;
    max-width: 100%;
    border-radius: 4px;
    object-fit: contain;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.donation-module {
    margin-top: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: #fafafa;
}

.donation-note {
    margin: 0;
    color: #333;
    line-height: 1.7;
}

.donation-btn {
    display: inline-block;
    text-decoration: none;
    margin-top: 0.9rem;
}

.donation-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.9rem;
}

.donation-actions .donation-btn {
    margin-top: 0;
    flex: 1 1 220px;
    text-align: center;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    line-height: 1.1;
}

.donation-btn--btc {
    background: #981b1f;
}

.donation-btn--btc:hover {
    background: #7a1519;
}

.donation-btc {
    margin-top: 0.75rem;
}

.donation-btc-label {
    font-weight: 600;
    color: #000;
    margin-bottom: 0.25rem;
}

.donation-btc-address {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    word-break: break-all;
}

/* Modal (BTC donate) */
body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 2000;
}

.modal-overlay.is-open {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
}

.modal-close {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.04);
}

.modal-body {
    padding: 1.25rem;
}

.btc-modal-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.btc-qr {
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btc-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btc-label {
    font-weight: 700;
    color: #000;
}

.btc-address {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    word-break: break-all;
}

.btc-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.btc-actions .submit-btn {
    flex: 1 1 180px;
    text-align: center;
}

.btc-actions .btc-open-wallet,
.btc-actions .btc-copy {
    align-self: stretch;
}

.btc-open-wallet {
    text-decoration: none;
}

.btc-copy-status {
    min-height: 1.25rem;
    color: #333;
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .btc-modal-grid {
        grid-template-columns: 1fr;
    }
}


.submit-btn {
    background: #000;
    color: #fff;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.join-button {
    display: inline-block;
    background: #981b1f;
    color: #fff;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.join-button:hover {
    background: #7a1519;
    transform: translateY(-2px);
}

.join-button:active {
    transform: translateY(0);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.3);
    display: block;
}

.form-message.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.3);
    display: block;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0.75rem 0;
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #fff;
    z-index: 999;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-nav {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .top-nav-links {
        gap: 1rem;
    }

    .top-nav-link {
        font-size: 0.85rem;
    }

    .hero-section {
        padding: 1.5rem 1.5rem;
        margin-top: 50px;
    }

    .hero-section {
        min-height: 120px;
        padding: 1.5rem 1rem;
    }

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

    .hero-tree-left {
        left: 1rem;
        height: 60px;
    }

    .hero-tree-right {
        right: 1rem;
        height: 60px;
    }

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

    main {
        padding: 2rem 1rem;
        padding-bottom: 5rem;
    }

    .expandable-header {
        padding: 1rem 1.5rem;
    }

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

    .expandable-content {
        padding: 0 1.5rem;
    }

    .expandable-section.expanded .expandable-content {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    footer {
        padding: 0.5rem 0;
        font-size: 0.8rem;
    }

    .content h2 {
        font-size: 1.75rem;
    }

    .content h3 {
        font-size: 1.25rem;
    }

    .landing-box-inner,
    .landing-box-inner--reverse {
        grid-template-columns: 1fr;
    }

    .landing-box--text-right .landing-box-text {
        text-align: left;
    }

    .landing-box--text-right .landing-box-text ul {
        margin-right: 0;
        margin-left: 1.5rem;
        direction: ltr;
    }

    .landing-box--text-right .landing-box-text ul li {
        text-align: left;
    }
}

/* Forum Styles */
.forum-post {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.forum-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.forum-author {
    font-weight: 600;
    color: #8B0000;
    font-size: 0.95rem;
}

.forum-date {
    color: #666;
    font-size: 0.85rem;
}

.forum-post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
}

.forum-post-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.forum-post-footer {
    margin-top: 1rem;
}

.forum-reply-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.forum-reply-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #8B0000;
    color: #8B0000;
}

.forum-replies {
    margin-top: 1rem;
}

.forum-replies-list {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(139, 0, 0, 0.2);
}

.forum-reply {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.forum-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.forum-reply-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}

.forum-reply-form {
    margin-top: 1rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 6px;
}

.forum-reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.forum-reply-form textarea:focus {
    outline: none;
    border-color: #8B0000;
}
