/**
 * 公共样式 - 全局基础样式与CSS变量系统
 */

/* ========== CSS自定义属性（设计令牌） ========== */
:root {
    /* 品牌色彩系统 */
    --primary-color: #b1ce48;
    --primary-dark: #9ab73a;
    --primary-light: rgba(177, 206, 72, 0.1);
    --primary-gradient: linear-gradient(135deg, #b1ce48, #9ab73a);
    
    /* 功能色彩 */
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #ff4d4f;
    --info-color: #1890ff;
    
    /* 文本颜色 */
    --text-primary: #1a1a2e;
    --text-secondary: #666;
    --text-muted: #999;
    --text-disabled: #bbb;
    
    /* 背景颜色 */
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --bg-gray: #f5f5f5;
    --bg-hover: #f0f0f0;
    
    /* 边框颜色 */
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    
    /* 间距系统（8px基准） */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* 圆角系统 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    /* 阴影系统 */
    --shadow-none: none;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
    
    /* 过渡动画 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 字体大小 */
    --font-xs: 12px;
    --font-sm: 13px;
    --font-base: 14px;
    --font-md: 15px;
    --font-lg: 16px;
    --font-xl: 18px;
    --font-2xl: 20px;
    --font-3xl: 24px;
    --font-4xl: 32px;
    
    /* 行高 */
    --leading-tight: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.6;
    --leading-loose: 1.8;
    
    /* 断点 */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* Z-index层级 */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* 全局头像圆形规则 - 确保所有头像都是圆形 */
img[class*="logo"],
img[class*="avatar"],
.company-logo,
.company-avatar,
.provider-avatar,
.publisher-avatar {
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* 重置样式 */
* {
    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:not(.artist-image) {
    max-width: 100%;
    height: auto;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* 按钮 - 基础样式已移至 components.css */

/* 页面内容 */
.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;
}
