* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #f8f9fa;
    padding-bottom: 50px;
}

.header {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    padding: 20px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(214, 72, 150, 0.1);
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #d64896;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo::before {
    content: "✨";
}

.header-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-purple {
    background-color: #d64896;
    color: white;
}

.btn-red {
    background-color: #ff5252;
    color: white;
}

.btn-blue {
    background-color: #42a5f5;
    color: white;
}

.btn-gray {
    background-color: #757575;
    color: white;
}

.btn-green {
    background-color: #07c160;
    color: white;
}

.tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background-color: #d64896;
    color: white;
}

.area-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 彻底隐藏区域标题（无空白） */
.area-title {
    display: none !important;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 18px;
}

/* 平板端适配 */
@media (max-width: 1200px) {
    .tables-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 手机端核心适配 */
@media (max-width: 768px) {
    .tables-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .area-section {
        padding: 10px;
        border-radius: 10px;
    }
    .table-card {
        padding: 18px 8px;
        min-height: 110px;
    }
    .table-name {
        font-size: 20px;
    }
    .table-time {
        font-size: 20px;
    }
}

/* 核心：所有卡片边框颜色加深 */
.table-card {
    background: #e3f2fd;
    border: 2px solid #8cb3d6;
    border-radius: 12px;
    padding: 22px 12px;
    min-height: 130px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.table-card.idle {
    background: #e8f5e9;
    border-color: #94c896;
}

.table-card.paused {
    background: #fff3e0;
    border-color: #e6b980;
}

.table-card.overtime {
    background: #ffebee;
    border-color: #e6999e;
    animation: pulse 1s infinite;
}

.table-card.unlimited {
    background: #f3e5f5;
    border-color: #b374b3;
}

.table-card.unlimited .table-time {
    color: #9c27b0 !important;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

.table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 桌位号 - 深灰色 */
.table-name {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 10px;
}

/* 基础倒计时样式：深灰色 */
.table-time {
    font-size: 22px;
    font-weight: 600;
    color: #444444;
    margin-bottom: 6px;
}
/* 已开始（使用中）：红色 */
.table-card.using .table-time{
    color: #f44336;
}
/* 超时：红色 */
.table-time.overtime {
    color: #f44336;
}

/* 计时名称 - 浅灰色 */
.table-duration-name {
    font-size: 14px;
    color: #999999;
    font-weight: 600;
    margin: 6px 0;
}

.table-start {
    font-size: 13px;
    color: #666;
}

.login-card {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.login-card h2 {
    margin-bottom: 30px;
    color: #d64896;
}

.login-card input {
    width: 100%;
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 16px;
}

.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background-color: #fafafa;
    font-weight: 600;
    color: #666;
}

.status-idle {
    color: #2e7d32;
    background-color: #e8f5e9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-using {
    color: #ef6c00;
    background-color: #fff3e0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-overtime {
    color: #c62828;
    background-color: #ffebee;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-unlimited {
    color: #9c27b0;
    background-color: #f3e5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #d64896;
}

.modal-content input, .modal-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 16px;
}

.duration-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.duration-option {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.duration-option.active {
    border-color: #d64896;
    background-color: #fce4ec;
    color: #d64896;
    font-weight: 600;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-buttons .btn {
    flex: 1;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 2000;
    display: none;
}

.table-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.table-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.table-list-item:last-child {
    border-bottom: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 20px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8 rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card .stat-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
}

.platform-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.platform-meituan {
    background: #fff3e0;
    color: #ff6d00;
}
.platform-douyin {
    background: #000;
    color: #fff;
}