/* ============================================
   PUBLIC.CSS - Base styles for the entire app
   ============================================ */

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f5f5;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    padding: 0 15px 100px;
}

/* ---- Section ---- */
.section {
    margin-bottom: 20px;
}

.section+.section {
    margin-top: 15px;
}

.section .wrap {
    padding: 0;
}

/* ---- Navbar ---- */
.section-navbar {
    padding-top: 10px;
}

.section-navbar .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.section-navbar .section-head .left {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 5px;
}

.section-navbar .section-head .left img {
    height: 20px;
}

.section-navbar .section-head .center {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    flex: 1;
}

.section-navbar .section-head .right {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 5px;
    font-size: 14px;
}

.section-navbar .section-head .right img {
    height: 20px;
}

/* ---- Switch ---- */
.section-switch .wrap {
    display: flex;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 15px;
}

.switch-button {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-button.active {
    background: #000;
    color: #fff;
    font-weight: bold;
}

/* ---- Balance Section ---- */
.balance-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.balance-amount .key {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.balance-amount .val {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.balance-amount .val span {
    font-size: 18px;
}

.balance-cards {
    display: flex;
    gap: 10px;
}

.balance-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
}

.balance-card-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.balance-card-value {
    font-size: 16px;
    font-weight: bold;
}

/* ---- Action Buttons ---- */
.action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.action-btn-icon {
    width: 35px;
    height: 35px;
    margin-bottom: 8px;
}

.action-btn-text {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

/* ---- Form ---- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    display: flex;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
}

.form-input.line-input {
    border: 1px solid #e0e0e0;
    background: #fff;
}

.form-input.gray-input {
    background: #F8F8F8;
    border: 1px solid #eee;
}

.form-input.split-input {
    background: #F8F8F8;
    border: 1px solid #eee;
    justify-content: space-between;
}

.input-prefix {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 10px;
    font-size: 14px;
    color: #333;
    border-right: 1px solid #e0e0e0;
}

.input-prefix img {
    height: 18px;
}

.input-wrapper {
    flex: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 10px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}

.input-suffix {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    cursor: pointer;
    font-size: 14px;
}

.input-suffix img {
    height: 18px;
}

.input-suffix .icon-eye-open {
    display: none;
}

.input-suffix.eye-close .icon-eye-close {
    display: block;
}

.input-suffix.eye-close .icon-eye-open {
    display: none;
}

.input-suffix:not(.eye-close) .icon-eye-close {
    display: none;
}

.input-suffix:not(.eye-close) .icon-eye-open {
    display: block;
}

/* ---- Button ---- */
.we-button {
    display: block;
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
}

.we-button:active {
    background: #333;
}

.we-button.disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ---- We Switch ---- */
.we-switch {
    color: #0066cc;
    font-size: 14px;
    cursor: pointer;
}

/* ---- We Invite ---- */
.we-invite {
    display: inline-block;
    padding: 12px 40px;
    background: #000;
    color: #fff;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* ---- Section Invite ---- */
.section-invite .wrap {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
}

.section-invite .section-head {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.section-invite .section-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 10px;
}

.section-invite .section-body .txt {
    font-size: 12px;
    color: #666;
    word-break: break-all;
    flex: 1;
    margin-right: 10px;
}

.section-invite .section-body img {
    height: 24px;
    cursor: pointer;
}

/* ---- Investments Section ---- */
.investments-section {
    margin-bottom: 30px;
}

.investments-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.investment-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.investment-member {
    font-size: 14px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 10px;
}

.investment-header {
    display: flex;
    gap: 10px;
}

.investment-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.investment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.investment-info {
    flex: 1;
}

.investment-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.investment-tag,
.investment-price,
.investment-income {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.investment-tag .value,
.investment-price .value,
.investment-income .value {
    color: #333;
    font-weight: 500;
}

.investment-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

.stat-value {
    font-size: 14px;
    font-weight: bold;
}

.purchase-button {
    cursor: pointer;
}

.purchase-button img {
    width: 30px;
    height: 30px;
}

/* ---- Section Rules ---- */
.section-rules {
    margin-top: 20px;
    padding-bottom: 30px;
}

.section-rules .wrap {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
}

/* ---- Dialog ---- */
.dialog,
.dialog-notice,
.dialog-reward,
.dialog-luckyt {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 13;
    width: 85%;
    max-width: 400px;
}

.dialog .wrap,
.dialog-notice .wrap,
.dialog-reward .wrap,
.dialog-luckyt .wrap {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.dialog-shut,
.shut {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    cursor: pointer;
}

.dialog-shut img,
.shut img {
    width: 24px;
    height: 24px;
}

.dialog-head img {
    width: 100%;
    display: block;
}

.dialog-body {
    padding: 20px;
    text-align: center;
}

.dialog-body .tips {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.dialog-body .notice {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 20px;
}

.dialog-body .main {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.dialog-body .foot {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.foot-action {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 14px;
}

.foot-action img {
    width: 20px;
    height: 20px;
}

.dialog-foot {
    padding: 0 20px 20px;
}

.dialog-body .action {
    margin-top: 15px;
}

/* ---- Mask ---- */
.mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 12;
}