* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: white;
}

.auth-box {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-box h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #4facfe;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4facfe;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #4facfe;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #3a9bef;
}

.btn-secondary {
    padding: 10px 20px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-danger {
    width: 100%;
    padding: 14px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #e53e3e;
}

.error-message {
    color: #e53e3e;
    margin-top: 10px;
    font-size: 14px;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

#activity-name, #buddy-username {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

#reflection {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    resize: vertical;
}

.empty-state {
    color: #999;
    text-align: center;
    padding: 15px;
    font-size: 14px;
}

.current-activity-info {
    background: #f7fafc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.current-activity-info h3 {
    color: #4facfe;
    margin-bottom: 8px;
    font-size: 16px;
}

.activity-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #4facfe;
}

.activity-item h4 {
    color: #333;
    margin-bottom: 8px;
}

.activity-item p {
    color: #666;
    font-size: 14px;
    margin: 4px 0;
}

.buddy-item {
    background: #f7fafc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buddy-status-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.buddy-status-item.active {
    border-left: 4px solid #48bb78;
}

.buddy-status-item.idle {
    border-left: 4px solid #cbd5e0;
}

/* 活动记录表格样式 */
.activities-table {
    overflow-x: auto;
    margin-top: 15px;
}

.activities-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.activities-table thead {
    background: #f7fafc;
}

.activities-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e2e8f0;
}

.activities-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #555;
}

.activities-table tbody tr:hover {
    background: #f7fafc;
}

.activities-table td strong {
    color: #333;
}

.reflection-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.pagination button {
    padding: 8px 16px;
    background: #4facfe;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #3a9bef;
}

.pagination button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.pagination span {
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .activities-table {
        font-size: 12px;
    }
    
    .activities-table th,
    .activities-table td {
        padding: 8px 4px;
    }
    
    .reflection-cell {
        max-width: 100px;
    }
}
