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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f5f0;
    color: #333;
    line-height: 1.6;
    max-width: 414px;
    margin: 0 auto;
}

.container {
    max-width: 414px;
    margin: 0 auto;
    padding: 10px;
}

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

.top-nav {
    background: #1a1a2e;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    max-width: 414px;
    margin: 0 auto;
}

.logo {
    font-size: 16px;
    font-weight: bold;
    margin-right: 12px;
    white-space: nowrap;
    color: #d4af37;
}

.top-nav nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    flex: 1;
}

.top-nav nav::-webkit-scrollbar {
    display: none;
}

.top-nav nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.top-nav nav a.active,
.top-nav nav a:hover {
    background: #d4af37;
    color: #1a1a2e;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.section-desc {
    font-size: 13px;
    color: #666;
}

.countdown-section {
    background: linear-gradient(135deg, #c00 0%, #e74c3c 100%);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    color: #fff;
}

.countdown-label {
    font-size: 13px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.time-block {
    background: rgba(255,255,255,0.2);
    padding: 8px 10px;
    border-radius: 6px;
    min-width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-num {
    font-size: 20px;
    font-weight: bold;
}

.time-suffix {
    font-size: 10px;
    opacity: 0.8;
}

.time-separator {
    font-size: 18px;
    font-weight: bold;
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-bar select {
    flex: 1;
    min-width: 120px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

.welfare-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.welfare-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.welfare-card.status-ended {
    opacity: 0.7;
}

.welfare-image {
    width: 100%;
    height: 160px;
    position: relative;
}

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

.welfare-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #fff;
}

.badge-ongoing {
    background: #27ae60;
}

.badge-upcoming {
    background: #f39c12;
}

.badge-ended {
    background: #95a5a6;
}

.welfare-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welfare-name {
    font-size: 15px;
    color: #333;
    font-weight: bold;
}

.welfare-desc {
    font-size: 12px;
    color: #666;
}

.welfare-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.welfare-stock {
    color: #c00;
    font-weight: bold;
}

.welfare-time {
    color: #666;
}

.welfare-progress {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #c00, #e74c3c);
    border-radius: 3px;
}

.welfare-actions {
    display: flex;
    gap: 10px;
}

.welfare-btn {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d4af37;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #f8f5f0;
    color: #d4af37;
    border: 1px solid #d4af37;
}

.btn-primary:hover {
    background: #d4af37;
    color: #fff;
}

.btn-remind {
    background: #f39c12;
    color: #fff;
}

.btn-remind:hover {
    background: #e67e22;
}

.btn-disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.page-btn:hover {
    border-color: #8B4513;
    color: #8B4513;
}

.page-btn.active {
    background: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

#float-btn {
    position: fixed;
    right: 15px;
    bottom: 80px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: #fff;
    padding: 12px 15px;
    border-radius: 25px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    cursor: pointer;
    z-index: 99;
}
