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

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background: #f5f5f5;
    max-width: 414px;
    margin: 0 auto;
    min-height: 100vh;
    overflow-x: hidden;
}

.banner img {
    width: 100%;
    max-width: 414px;
    height: auto;
    aspect-ratio: 414 / 217;
    display: block;
    object-fit: cover;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
}

.btn-activity, .btn-login {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    color: #fff;
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
}

.btn-activity {
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
    color: #fff;
}

.btn-login {
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
    color: #fff;
}

.btn-activity:hover, .btn-login:hover {
    background: linear-gradient(to bottom, #ffa726, #ef6c00);
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 12px;
}

.card {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    text-align: center;
    padding-bottom: 10px;
}

.card img {
    width: calc(100% - 22px);
    max-width: 166px;
    aspect-ratio: 166 / 119;
    height: auto;
    object-fit: cover;
    margin: 11px auto 0;
    display: block;
    border-radius: 4px;
}

.card .number {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 8px;
}

.card .title {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin: 2px 0 8px;
    padding: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-vote {
    display: inline-block;
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
    color: #fff;
    border: none;
    padding: 6px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.btn-vote:hover {
    background: linear-gradient(to bottom, #ffa726, #ef6c00);
}

/* 底部加载提示 */
.loading-more {
    text-align: center;
    width: 100%;
    padding: 20px 0 30px;
    font-size: 14px;
    color: #999;
    letter-spacing: 0.5px;
}

/* 弹窗通用样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    width: 340px;
    max-height: 80vh;
    position: relative;
}

/* 活动规则弹窗 */
.modal-rules .modal-box {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-rules .modal-header {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-rules .modal-body {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-rules .modal-footer {
    padding: 12px 20px 16px;
    text-align: center;
    flex-shrink: 0;
    border-top: 1px solid #eee;
}

.btn-close-modal {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-close-modal:hover {
    background: linear-gradient(to bottom, #ffa726, #ef6c00);
}

/* 登录提示弹窗 */
.modal-login .modal-box {
    padding: 24px 20px;
    text-align: center;
}

.modal-login .modal-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

.modal-login .modal-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

.btn-line-login {
    display: block;
    width: 100%;
    padding: 12px;
    background: #06c755;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    text-decoration: none;
    text-align: center;
}

.btn-line-login:hover {
    background: #05b34a;
}

.btn-cancel {
    display: block;
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

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

/* LINE登录页面 */
.login-page {
    background: #fff;
    min-height: 100vh;
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(to right, #06c755, #4dc8f5);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    position: relative;
}

.login-header .back-btn {
    position: absolute;
    left: 16px;
    color: #fff;
    text-decoration: none;
    font-size: 28px;
    line-height: 1;
}

.login-body {
    padding: 30px 24px;
    text-align: center;
}

.login-body .line-icon {
    width: 80px;
    height: 80px;
    background: #06c755;
    border-radius: 20px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-body .line-icon svg {
    width: 50px;
    height: 50px;
    fill: #fff;
}

.login-body h1 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #333;
}

.login-body .desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: left;
}

.login-body .desc a {
    color: #06c755;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 14px;
    color: #06c755;
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
}

.form-group label::before {
    content: '* ';
    color: #DD524D;
}

.form-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-group input {
    flex: 1;
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    font-size: 15px;
    outline: none;
}

.form-group input::placeholder {
    color: #ccc;
}

.form-group .hint {
    font-size: 12px;
    color: #DD524D;
    margin-top: 4px;
}

.btn-green {
    padding: 6px 16px;
    background: #06c755;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-green:hover {
    background: #05b34a;
}

.btn-next {
    width: 66px;
    height: 66px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-block;
}

.btn-next img {
    width: 66px;
    height: 66px;
    display: block;
}

.btn-next:hover {
    opacity: 0.85;
}

/* Toast 提示 */
.toast {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
}

.toast.show {
    display: block;
}

/* 加载动画 */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #06c755;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 按钮禁用状态 */
.btn-green:disabled {
    background: #06c755;
    opacity: 0.7;
    cursor: not-allowed;
}

/* 管理后台 */
.admin-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    min-height: 100vh;
}

.admin-wrap body {
    max-width: none;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 2px solid #f57c00;
    margin-bottom: 20px;
}

.admin-header h1 {
    font-size: 22px;
    color: #f57c00;
}

.admin-nav {
    display: flex;
    gap: 8px;
}

.admin-nav a {
    padding: 6px 16px;
    background: #f57c00;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.admin-nav a:hover {
    background: #ef6c00;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 14px;
}

.admin-table th {
    background: #f57c00;
    color: #fff;
}

.admin-table tr:nth-child(even) {
    background: #fafafa;
}

.admin-table img {
    max-width: 80px;
    max-height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.admin-form {
    background: #fafafa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.admin-form .form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.admin-form label {
    font-size: 14px;
    font-weight: bold;
    min-width: 80px;
}

.admin-form input[type="text"],
.admin-form input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    min-width: 150px;
}

.admin-form input[type="file"] {
    font-size: 14px;
}

.btn-admin {
    padding: 8px 20px;
    background: #f57c00;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.btn-admin:hover {
    background: #ef6c00;
}

.btn-admin.danger {
    background: #e53935;
}

.btn-admin.danger:hover {
    background: #c62828;
}

/* 管理员登录 */
.admin-login {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.admin-login h1 {
    font-size: 22px;
    color: #f57c00;
    margin-bottom: 24px;
}

.admin-login input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 12px;
}

.admin-login button {
    width: 100%;
    padding: 12px;
    background: #f57c00;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.admin-login button:hover {
    background: #ef6c00;
}

.msg-error {
    color: #e53935;
    font-size: 14px;
    margin-bottom: 10px;
}

.msg-success {
    color: #2e7d32;
    font-size: 14px;
    margin-bottom: 10px;
}
