/* 门户专属样式 */
.obsidian-display {
    color: #a78bfa !important;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 黑曜石图标（我的世界方块） */
.obsidian-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    vertical-align: middle;
    border-radius: 2px;
    image-rendering: pixelated;
}

.obsidian-icon-sm { width: 14px; height: 14px; }
.obsidian-icon-md { width: 20px; height: 20px; }
.obsidian-icon-lg { width: 32px; height: 32px; }
.obsidian-icon-xl { width: 56px; height: 56px; }

.obsidian-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 签到页面 */
.checkin-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 800px;
}

.checkin-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.checkin-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.checkin-icon .obsidian-icon {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(139,92,246,0.3);
}

.checkin-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.checkin-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.checkin-reward {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f3f4f6;
    border-radius: 12px;
    margin-bottom: 24px;
}

.reward-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.reward-value {
    font-size: 20px;
    font-weight: 700;
    color: #8b5cf6;
}

.checkin-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.checkin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139,92,246,0.3);
}

.checkin-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.checkin-status {
    margin-top: 16px;
    font-size: 14px;
    color: #6b7280;
    min-height: 20px;
}

.checkin-status.signed {
    color: #22c55e;
}

.balance-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.balance-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.balance-icon .obsidian-icon {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(167,139,250,0.4);
}

.balance-label {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
}

.balance-value {
    font-size: 48px;
    font-weight: 800;
    color: #a78bfa;
}

/* 社区聊天 */
.chat-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    max-height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.chat-msg-avatar.admin {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.chat-msg-avatar.user {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.chat-msg-body {
    flex: 1;
    min-width: 0;
}

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.chat-msg-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}

.chat-msg-tag {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.chat-msg-tag.admin {
    background: rgba(14,165,233,0.15);
    color: #0284c7;
}

.chat-msg-time {
    font-size: 11px;
    color: #9ca3af;
}

.chat-msg-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    word-break: break-word;
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: 4px 12px 12px 12px;
    display: inline-block;
    max-width: 100%;
}

.chat-msg-actions {
    margin-top: 4px;
    display: flex;
    gap: 8px;
}

.chat-msg-delete {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.chat-msg-delete:hover {
    background: rgba(239,68,68,0.1);
}

.chat-empty {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.chat-input-area input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}

.chat-input-area input:disabled {
    background: #f9fafb;
    cursor: not-allowed;
}

.chat-input-area .btn-confirm {
    padding: 12px 24px;
    white-space: nowrap;
}

.chat-input-area .btn-confirm:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* 商店 */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.shop-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.shop-card-id {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 12px;
}

.shop-card-icon {
    font-size: 48px;
    margin-bottom: 12px;
    text-align: center;
}

.shop-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.shop-card-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.shop-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.shop-card-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 20px;
    font-weight: 700;
    color: #8b5cf6;
}

.shop-card-stock {
    font-size: 12px;
    color: #9ca3af;
}

.shop-card-stock.out {
    color: #ef4444;
}

.buy-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}

.buy-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* 购买弹窗内容 */
.buy-modal-item {
    text-align: center;
    padding: 10px 0;
}

.buy-modal-item .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.buy-modal-item .name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.buy-modal-item .price {
    font-size: 24px;
    font-weight: 700;
    color: #8b5cf6;
    margin: 12px 0;
}

.buy-modal-item .balance-info {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
}

.buy-modal-item .balance-after {
    font-size: 13px;
    color: #22c55e;
    margin-top: 4px;
}

.buy-modal-item .balance-after.insufficient {
    color: #ef4444;
}

@media (max-width: 768px) {
    .checkin-container { grid-template-columns: 1fr; }
    .shop-grid { grid-template-columns: 1fr; }
}

/* 聊天图片 */
.chat-msg-image {
    margin-top: 8px;
    max-width: 280px;
    max-height: 280px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.chat-msg-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.chat-image-btn {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-image-btn:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.chat-input-preview {
    position: relative;
    margin-right: 8px;
}

.chat-input-preview img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.chat-input-preview .remove-preview {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图片预览大图 */
.image-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.image-viewer-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    object-fit: contain;
}

/* ===== 大屏公告展示 ===== */
.announcement-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,14,20,0.97), rgba(26,15,46,0.97));
    z-index: 9000;
    display: flex;
    flex-direction: column;
    padding: 40px;
    backdrop-filter: blur(12px);
    animation: fadeIn 0.4s ease;
}

.announcement-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    color: #fff;
}

.announcement-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
}

.announcement-close {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.announcement-close:hover {
    background: rgba(255,255,255,0.2);
}

.announcement-skip-today {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    cursor: pointer;
    margin-left: 12px;
    text-decoration: underline;
}

.announcement-skip-today:hover {
    color: rgba(255,255,255,0.8);
}

.announcement-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.announcement-empty {
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 80px 20px;
    font-size: 18px;
}

.announcement-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    backdrop-filter: blur(8px);
}

.announcement-card.admin {
    border-left: 4px solid #60a5fa;
}

.announcement-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.announcement-avatar.admin {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.announcement-avatar.user {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.announcement-body {
    flex: 1;
    min-width: 0;
}

.announcement-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.announcement-name {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.announcement-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(14,165,233,0.2);
    color: #60a5fa;
}

.announcement-time {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}

.announcement-text {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    line-height: 1.6;
    word-break: break-word;
}

.announcement-image {
    margin-top: 12px;
    max-width: 400px;
    max-height: 400px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.announcement-image img {
    width: 100%;
    height: auto;
    display: block;
}

.announcement-footer {
    margin-top: 24px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}

/* ===== 修改账号名弹窗 ===== */
.profile-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.profile-modal-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}

.profile-edit-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.2s;
}

.profile-edit-btn:hover {
    border-color: #a78bfa;
    color: #a78bfa;
}
