/* 基础样式 */
* { 
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    font-size: 16px;
}

.container {
    max-width: 100%;
    padding: 15px;
}

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

.header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-success {
    background: #2ecc71;
}

.btn-warning {
    background: #f39c12;
}

.btn-danger {
    background: #e74c3c;
}

.btn-primary {
    background: #3498db;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.error {
    color: #e74c3c;
    background: #fceae9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.success {
    color: #27ae60;
    background: #eafaf1;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* 仪表盘特定样式 */
.dashboard-header {
    padding: 15px 0;
}

.welcome {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.user-level {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.invite-link {
    background: #f1f8ff;
    border: 1px dashed #c8e1ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow-wrap: break-word;
}

.copy-btn {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

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

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    margin: 5px 0;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.invited-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.invited-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.user-level-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.level-normal {
    background: #e0e0e0;
    color: #666;
}

.level-vip {
    background: #ffeb3b;
    color: #ff6f00;
}

.level-svip {
    background: #ff4081;
    color: white;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* 管理员面板样式 */
.table-container {
    overflow-x: auto;
}

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

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

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

tr:hover {
    background-color: #f9f9f9;
}

.locked {
    color: #e74c3c;
    font-weight: bold;
}

.normal {
    color: #7f8c8d;
}

.form-inline {
    display: flex;
    gap: 10px;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .container {
        max-width: 750px;
        margin: 0 auto;
        padding: 20px;
    }
    
    .copy-btn {
        width: auto;
    }
    
    .actions .btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 970px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1170px;
    }
}

/* 公告样式 */
.announcement-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.announcement-card {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 15px;
}

.announcement-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.1rem;
}

.announcement-content {
    line-height: 1.5;
    color: #555;
}

.announcement-date {
    font-size: 0.85rem;
    color: #888;
    margin-top: 8px;
    text-align: right;
}

/* 公告管理页面 */
.announcement-form {
    margin-top: 20px;
}

.announcement-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.announcement-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid #4a90e2;
}

.announcement-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.announcement-item-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.announcement-item-date {
    font-size: 0.85rem;
    color: #777;
}

.announcement-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}