body {
    background-image: image-set(url('/images/background-1920.avif') type('image/avif'), url('/images/background-1920.webp') type('image/webp'), url('/images/background.jpg') type('image/jpeg'));
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

.site-wrapper {
    background-color: rgba(0, 0, 0, 0.3);
}

.hero-banner-background {
    height: 50px;
    width: 100%;
}

.page-container {
    max-width: var(--content-width);
    margin: 30px auto;
    padding: 25px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lottery-content-area {
    display: flex;
    gap: 20px;
}

.main-lottery-column {
    flex: 3;
}

.sidebar-column {
    flex: 1;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.lottery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* 平板适配 */
@media (max-width: 992px) {
    .page-container {
        margin: 20px;
        padding: 20px;
    }
    
    .lottery-content-area {
        gap: 15px;
    }
    
    .sidebar-column {
        padding: 15px;
    }
}

/* 手机适配 */
@media (max-width: 768px) {
    .page-container {
        margin: 10px;
        padding: 15px;
        border-radius: 8px;
    }
    
    .lottery-content-area {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-lottery-column,
    .sidebar-column {
        flex: none;
        width: 100%;
    }
    
    .sidebar-column {
        order: -1; /* 移动端侧边栏显示在主内容上方 */
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .lottery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 15px;
    }
    
    .lottery-header h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    /* 彩票卡片优化 */
    .lottery-grid .lottery-card {
        width: calc(50% - 10px) !important;
        margin-bottom: 15px;
    }
    
    .lottery-card {
        padding: 12px;
        min-height: 120px;
    }
    
    .lottery-title {
        font-size: 15px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .lottery-prize {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .lottery-meta {
        font-size: 11px;
    }
}

/* 小屏手机适配 */
@media (max-width: 576px) {
    .page-container {
        margin: 5px;
        padding: 12px;
    }
    
    .lottery-content-area {
        gap: 15px;
    }
    
    .sidebar-column {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .lottery-header h1 {
        font-size: 18px;
    }
    
    /* 彩票卡片单列显示 */
    .lottery-grid .lottery-card {
        width: 100% !important;
        margin-bottom: 12px;
    }
    
    .lottery-card {
        padding: 15px;
        min-height: auto;
        border-radius: 8px;
    }
    
    .lottery-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .lottery-prize {
        font-size: 14px;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .lottery-meta {
        font-size: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .lottery-meta span {
        margin-right: 0;
    }
}

.lottery-header h2 {
    margin: 0;
    font-size: 24px;
}

.btn-primary {
    background-color: #3366cc;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.lottery-post {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

/* "需贴图"标签样式 */
.require-image {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #e74c3c;
    background-color: #fdf2f2;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #fadbd8;
    margin-left: 8px;
}

.require-image i {
    margin-right: 5px;
    color: #e74c3c;
}


.lottery-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lottery-post h3 {
    margin-top: 0;
    font-size: 20px;
}

.lottery-post .meta {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* 我的抽奖页面专用样式 */
.lottery-list-container {
    display: grid;
    gap: 20px;
}

/* 改进的抽奖卡片样式 */
.community-post {
    position: relative;
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.community-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

/* 抽奖状态样式 */
.lottery-status-open {
    border-left: 4px solid #28a745;
}

.lottery-status-closed {
    border-left: 4px solid #6c757d;
}

.lottery-status-drawing {
    border-left: 4px solid #ffc107;
}

/* 卡片内容区域 */
.community-post .post-main-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

.community-post .post-content {
    padding: 20px;
    flex-grow: 1;
}

/* 操作按钮容器 */
.post-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.community-post:hover .post-actions {
    opacity: 1;
    transform: translateY(0);
}

/* 编辑按钮样式 */
.btn-edit {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.btn-edit .btn-text {
    display: none;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.btn-edit:active {
    transform: scale(0.95);
}

/* 删除按钮样式 */
.btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.btn-delete .btn-text {
    display: none;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.btn-delete:active {
    transform: scale(0.95);
}

/* 改进标题样式 */
.community-post h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

/* 抽奖信息样式 */
.lottery-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.lottery-info .prize,
.lottery-info .winner-count {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
}

.lottery-info .prize {
    color: #e74c3c;
}

.lottery-info .winner-count {
    color: #f39c12;
}

.lottery-info i {
    margin-right: 6px;
    font-size: 1rem;
}

/* 内容预览样式 */
.community-post p {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* 元信息样式 */
.community-post .meta {
    font-size: 0.85rem;
    color: #868e96;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.community-post .meta span {
    display: flex;
    align-items: center;
    margin-right: 0;
}

.community-post .meta i {
    margin-right: 5px;
    color: #adb5bd;
}

.community-post .meta .countdown {
    font-weight: 500;
}

/* 空状态样式 */
.lottery-list-container p {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .community-post {
        margin-bottom: 15px;
    }
    
    .community-post .post-content {
        padding: 15px;
    }
    
    .post-actions {
        position: static;
        opacity: 1;
        transform: none;
        justify-content: center;
        padding: 15px;
        background-color: #f8f9fa;
        border-top: 1px solid #e9ecef;
        margin-top: 15px;
    }
    
    .btn-edit,
    .btn-delete {
        flex: 1;
        max-width: 120px;
        height: 48px;
        font-size: 16px;
        gap: 8px;
    }
    
    .btn-edit .btn-text,
    .btn-delete .btn-text {
        display: inline;
        font-size: 14px;
        font-weight: 500;
    }
    
    .btn-edit i,
    .btn-delete i {
        margin-right: 0;
    }
    
    .lottery-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .community-post .meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .community-post h3 {
        font-size: 1.2rem;
    }
    
    .community-post .post-main-image {
        height: 150px;
    }
    
    .post-actions {
        gap: 12px;
    }
}

/* Mobile lottery page refresh */
.lottery-state-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 249, 252, 0.98) 100%);
    box-shadow: 0 18px 40px rgba(27, 39, 76, 0.08);
    text-align: left;
}

.lottery-state-card .state-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.18) 0%, rgba(232, 66, 90, 0.12) 100%);
    color: #ff6b35;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    flex: 0 0 auto;
}

.lottery-state-card .state-icon i {
    font-size: 22px;
}

.lottery-state-card .state-copy {
    min-width: 0;
}

.lottery-state-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    line-height: 1.3;
    color: #22304a;
}

.lottery-state-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #5d687c;
    background: transparent;
    padding: 0;
}

.lottery-state-error .state-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(59, 130, 246, 0.14) 100%);
    color: #4f46e5;
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-position: center top;
    }

    .hero-banner-background {
        height: 18px;
    }

    .page-container {
        margin: 0 auto 18px;
        padding: 0 12px 20px;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .lottery-content-area {
        gap: 14px;
    }

    .main-lottery-column,
    .sidebar-column {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 251, 255, 0.94) 100%);
        border: 1px solid rgba(255, 255, 255, 0.68);
        border-radius: 24px;
        box-shadow: 0 20px 45px rgba(19, 32, 68, 0.16);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        overflow: hidden;
    }

    .sidebar-column {
        order: -1;
        padding: 18px;
        margin-bottom: 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 245, 255, 0.94) 100%);
    }

    .sidebar-column h2 {
        margin: 0 0 14px;
        font-size: 1.9rem;
        line-height: 1.1;
        color: #2a2c34;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #recent-winners-container > p {
        margin: 0;
        padding: 14px 16px;
        border-radius: 16px;
        background: rgba(246, 247, 251, 0.96);
        border: 1px solid rgba(32, 42, 68, 0.06);
        color: #5f6678;
        text-align: left;
        font-size: 0.98rem;
    }

    .main-lottery-column {
        padding: 18px;
    }

    .lottery-header {
        margin-bottom: 16px;
        padding-bottom: 16px;
        gap: 14px;
        align-items: stretch;
        border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    }

    .lottery-header h1 {
        font-size: 1.9rem;
        line-height: 1.1;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #1f2937;
    }

    #create-lottery-btn {
        width: 100%;
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border-radius: 16px;
        padding: 0 18px;
        font-size: 1rem;
        font-weight: 700;
        background: linear-gradient(135deg, #ff6b35 0%, #ff556d 100%);
        box-shadow: 0 14px 30px rgba(255, 107, 53, 0.26);
    }

    .lottery-list-container {
        gap: 14px;
    }

    .community-post {
        margin-bottom: 0;
        border: none;
        border-radius: 20px;
        background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
    }

    .community-post .post-content {
        padding: 18px;
    }

    .community-post h3 {
        margin-bottom: 12px;
        font-size: 1.15rem;
        line-height: 1.35;
    }

    .lottery-info {
        gap: 10px;
        padding: 0;
        margin-bottom: 14px;
        background: transparent;
        border: none;
    }

    .lottery-info .prize,
    .lottery-info .winner-count,
    .lottery-info .require-image {
        min-height: 44px;
        padding: 10px 12px;
        border-radius: 14px;
        border: 1px solid rgba(30, 41, 59, 0.06);
        background: rgba(246, 248, 252, 0.96);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }

    .require-image {
        margin-left: 0;
    }

    .community-post p {
        margin-bottom: 14px;
        font-size: 0.96rem;
        line-height: 1.65;
        color: #5f6a7d;
    }

    .community-post .meta {
        gap: 8px;
        padding-top: 14px;
        border-top: 1px solid rgba(31, 41, 55, 0.08);
    }

    .community-post .meta span {
        width: 100%;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(248, 250, 252, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.16);
        color: #607085;
    }

    .community-post .meta .countdown {
        background: linear-gradient(135deg, rgba(255, 107, 53, 0.12) 0%, rgba(255, 85, 109, 0.12) 100%);
        border-color: rgba(255, 107, 53, 0.18);
        color: #d4552f;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 0 10px 18px;
    }

    .main-lottery-column,
    .sidebar-column {
        border-radius: 20px;
    }

    .main-lottery-column,
    .sidebar-column {
        padding: 16px;
    }

    .sidebar-column h2,
    .lottery-header h1 {
        font-size: 1.75rem;
    }

    .community-post .post-content {
        padding: 16px;
    }

    .lottery-state-card {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .lottery-state-card .state-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }
}

