/**
 * 公共样式
 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: #9ab73a;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-outline {
    background: transparent;
    border: 1px solid #e0e0e0;
    color: #666;
}

.btn-outline:hover {
    border-color: #b1ce48;
    color: #b1ce48;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 页面内容 */
.page-content {
    min-height: calc(100vh - 200px);
}

/* Material Icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: #4caf50;
}

.toast-error {
    background: #f44336;
}

.toast-info {
    background: #2196f3;
}

/* 确认对话框 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.confirm-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    min-width: 320px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.confirm-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-buttons .btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-buttons .btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: none;
}

.confirm-buttons .btn-secondary:hover {
    background: #e8e8e8;
}

.confirm-buttons .btn-primary {
    background: #b1ce48;
    color: white;
    border: none;
}

.confirm-buttons .btn-primary:hover {
    background: #9ab73a;
}

/* ==================== 移动端响应式适配 ==================== */

/* 平板和小屏设备 */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 16px;
    }
}

/* 手机端 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    /* 按钮适配 */
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }

    /* Toast 适配 */
    .toast {
        top: 70px;
        left: 12px;
        right: 12px;
        transform: translateY(-20px);
        padding: 10px 16px;
        font-size: 13px;
    }

    .toast.show {
        transform: translateY(0);
    }

    /* 确认对话框适配 */
    .confirm-content {
        min-width: auto;
        width: calc(100% - 24px);
        padding: 20px;
    }

    .confirm-message {
        font-size: 15px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* 按钮全宽 */
    .btn-full-mobile {
        width: 100%;
    }
}

/* 隐藏浏览器默认滚动提示 */
* {
    -webkit-overflow-scrolling: touch;
}

/* 隐藏滚动条但保持滚动功能 */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
