/**
 * 开心早餐 - 通用样式
 * Common Styles
 */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
}

ul, li {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* Colors */
:root {
    --primary-color: #ff6b35;
    --primary-light: #ff8c5a;
    --primary-dark: #e55a2b;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #ff4d4f;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #eee;
    --bg-white: #fff;
    --bg-gray: #f5f5f5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:active {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 2px;
    color: #fff;
}

.badge.hot {
    background: var(--danger-color);
}

.badge.new {
    background: var(--success-color);
}

/* Empty Tip */
.empty-tip {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
