/* 塔罗师展示网站 - 主样式文件 */
/* 主色调：黑色 (#000000, #1a1a1a, #2d2d2d) + 金色 (#d4af37, #ffd700, #b8860b) + 白色 (#ffffff, #f8f8f8) */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 桌面端默认隐藏移动端专用菜单项 */
.mobile-only {
    display: none !important;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    overflow-x: hidden; /* 防止水平滚动 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #000;
    border: 2px solid #d4af37;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b8860b, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: #2d2d2d;
    color: #fff;
    border: 2px solid #2d2d2d;
}

.btn-secondary:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.btn-outline {
    background: transparent;
    color: #d4af37;
    border: 2px solid #d4af37;
}

.btn-outline:hover {
    background: #d4af37;
    color: #000;
}

.btn-full {
    width: 100%;
}

/* ========================================
   HEADER STYLES - 重新设计的头部样式
   ======================================== */

/* Header 主容器 */
.site-header {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Header 内容布局 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    min-height: 50px;
}

/* Logo 区域 */
.logo {
    flex-shrink: 0;
}

.logo h1 {
    color: #d4af37;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.logo a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.9;
}

/* 主导航 */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    align-items: center;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    transition: all 0.3s ease;
    position: relative;
    line-height: 1.2;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: #d4af37;
}

.main-nav a:hover::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端菜单遮罩 */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 右侧操作区域 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* ========================================
   SEARCH STYLES - 搜索功能样式
   ======================================== */

.search-icon-container {
    position: relative;
}

/* 搜索图标按钮 */
.search-icon-btn {
    background: rgba(212, 175, 55, 0.1);
    border: none;
    color: #d4af37;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 36px;
}

.search-icon-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 20px;
    min-width: 320px;
    z-index: 1000;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.search-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #333;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-input::placeholder {
    color: #6c757d;
}

.search-submit-btn {
    background: #d4af37;
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background: #b8941f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ========================================
   USER MENU STYLES - 用户菜单样式
   ======================================== */

.user-menu {
    display: flex;
    align-items: center;
}

/* Header中的认证链接样式 */
.header-content .auth-links {
    display: flex;
    align-items: center;
    border: none;
    border-top: none;
    margin: 0;
    padding: 0;
}

.user-dropdown {
    position: relative;
}

.user-toggle {
    background: rgba(212, 175, 55, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
    height: 36px;
}

.user-toggle:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

/* 用户头像样式 */
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    border: none;
    flex-shrink: 0;
}

.default-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: none;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    line-height: 1;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* 登录按钮样式 */
.btn-login {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
}

.btn-login:hover {
    background: #d4af37;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    display: none;
    overflow: hidden;
    z-index: 1001;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.user-dropdown.active .dropdown-menu,
.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
}

/* 用户名点击样式 */
.user-name {
    cursor: pointer;
    transition: color 0.3s ease;
}

.user-name:hover {
    color: #d4af37;
}

/* 下拉菜单动画 */
.dropdown-menu {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.user-dropdown.active .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 未读消息徽章 - iPhone风格 */
.unread-messages-badge {
    position: absolute;
    top: -5px;
    right: 15px;
    background: #ff3b30;
    color: white;
    font-size: 0.75rem;
    padding: 0 6px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
    border: 2px solid white;
    animation: messageNotification 0.5s ease-out;
}

.unread-messages-badge:hover {
    background: #d70015;
    color: white;
    text-decoration: none;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* 消息通知动画 */
@keyframes messageNotification {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 脉冲动画 */
.unread-messages-badge::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 12px;
    background: rgba(255, 59, 48, 0.3);
    animation: messagePulse 2s infinite;
    z-index: -1;
}

@keyframes messagePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* 移动端用户名样式 */
.mobile-user-name {
    color: #d4af37 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.mobile-user-name:hover {
    color: #f4d03f !important;
}

/* 主要内容区域 */
main {
    min-height: calc(100vh - 200px);
}

/* 首页特殊样式 - 去掉padding */
.home-page main {
    padding: 0;
}

/* 首页横幅 */
.hero {
    background: #000000;
    color: #fff;
    text-align: center;
    padding: 150px 0;
    margin-bottom: 60px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #d4af37;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    font-weight: bold;
    line-height: 1.3;
}

.hero p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    opacity: 1;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 推荐塔罗师区域 */
.featured-readers {
    padding: 60px 0;
    background: #fff;
}

.featured-readers h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #1a1a1a;
    position: relative;
}

.featured-readers h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #ffd700);
}

/* 塔罗师卡片网格 - 竖向展示优化 */
.readers-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    margin-bottom: 40px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.reader-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.reader-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.reader-card.featured {
    border: 2px solid #d4af37;
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #000;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.reader-photo {
    height: 250px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f8f9fa !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 15px 15px 0 0 !important;
}

.reader-photo-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.3s ease !important;
}

.reader-photo-link:hover {
    transform: scale(1.02) !important;
}

.reader-photo-link:focus {
    outline: 2px solid #d4af37 !important;
    outline-offset: 2px !important;
}

/* 确保照片链接中的图片和默认照片样式正确 */
.reader-photo-link img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
}

.reader-photo-link .default-photo {
    width: calc(100% - 20px) !important;
    height: calc(100% - 20px) !important;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 60px !important;
    color: #6c757d !important;
    border: 2px dashed #d4af37 !important;
    border-radius: 10px !important;
    margin: 10px !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

.reader-photo-link:hover .default-photo {
    border-color: #b8860b !important;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0) !important;
}

.reader-photo img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
}

.reader-card:hover .reader-photo img {
    transform: scale(1.02);
}

/* 首页推荐塔罗师 - 参考readers页面设计 */
.featured-readers .readers-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    margin: 30px 0 !important;
}

.featured-readers .reader-card {
    background: #fff !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

.featured-readers .reader-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

/* 推荐标识 */
.featured-readers .reader-card::before {
    content: "推荐" !important;
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: linear-gradient(135deg, #d4af37, #ffd700) !important;
    color: #000 !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    z-index: 2 !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3) !important;
}

/* 照片容器 */
.featured-readers .reader-photo {
    height: 250px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f8f9fa !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 15px 15px 0 0 !important;
}

.featured-readers .reader-photo img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
}

.featured-readers .reader-card:hover .reader-photo img {
    transform: scale(1.02) !important;
}

.featured-readers .default-photo {
    width: calc(100% - 20px) !important;
    height: calc(100% - 20px) !important;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 60px !important;
    color: #6c757d !important;
    border: 2px dashed #d4af37 !important;
    border-radius: 10px !important;
    margin: 10px !important;
    box-sizing: border-box !important;
}

/* 信息区域 */
.featured-readers .reader-info {
    padding: 20px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.featured-readers .reader-info h3 {
    margin: 0 0 10px 0 !important;
    font-size: 1.3em !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

.featured-readers .reader-meta {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 15px !important;
    font-size: 0.9em !important;
    color: #666 !important;
}

.featured-readers .experience {
    color: #d4af37 !important;
    font-weight: 500 !important;
}

/* 专业标签 */
.featured-readers .specialties {
    margin-bottom: 15px !important;
}

.featured-readers .specialty-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 8px !important;
}

.featured-readers .specialty-tag {
    display: inline-block !important;
    padding: 4px 10px !important;
    background: linear-gradient(135deg, #d4af37, #ffd700) !important;
    color: #000 !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    border: 1px solid #d4af37 !important;
}

.featured-readers .specialty-tag:hover {
    background: linear-gradient(135deg, #b8860b, #d4af37) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3) !important;
    color: #000 !important;
}

/* 描述区域 */
.featured-readers .description {
    min-height: 40px !important;
    line-height: 1.4 !important;
    margin-bottom: 15px !important;
    color: #666 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

/* 按钮区域 */
.featured-readers .reader-actions {
    margin-top: auto !important;
    text-align: center !important;
}

.featured-readers .btn {
    padding: 10px 25px !important;
    border-radius: 25px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

/* 图片剪裁工具样式 */
.cropper-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cropper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.cropper-container {
    position: relative;
    background: white;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cropper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.cropper-header h3 {
    margin: 0;
    color: #333;
}

.cropper-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cropper-close:hover {
    color: #333;
}

.cropper-body {
    padding: 20px;
    display: flex;
    gap: 20px;
}

.cropper-canvas-container {
    position: relative;
    flex-shrink: 0;
}

#cropper-canvas {
    border: 2px solid #ddd;
    cursor: grab;
    display: block;
}

.cropper-circle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.cropper-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 200px;
}

.cropper-zoom {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cropper-zoom label {
    font-weight: 500;
    color: #333;
}

#cropper-zoom {
    width: 100%;
}

.cropper-preview-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cropper-preview-label {
    font-weight: 500;
    color: #333;
}

.cropper-preview {
    width: 100px;
    height: 100px;
    border: 2px solid #ddd;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cropper-preview canvas {
    border-radius: 50%;
}

.cropper-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cropper-footer .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cropper-footer .btn-secondary {
    background: #6c757d;
    color: white;
}

.cropper-footer .btn-primary {
    background: #d4af37;
    color: white;
}

.cropper-footer .btn:hover {
    opacity: 0.9;
}

/* 剪裁工具响应式设计 */
@media (max-width: 768px) {
    .cropper-container {
        max-width: 95vw;
        max-height: 95vh;
    }

    .cropper-body {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .cropper-controls {
        min-width: auto;
        width: 100%;
    }

    .cropper-canvas-container {
        align-self: center;
    }

    #cropper-canvas {
        max-width: 280px;
        max-height: 280px;
    }

    .cropper-header {
        padding: 10px 15px;
    }

    .cropper-footer {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .cropper-container {
        max-width: 98vw;
        max-height: 98vh;
    }

    #cropper-canvas {
        max-width: 250px;
        max-height: 250px;
    }

    .cropper-body {
        padding: 10px;
        gap: 10px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .featured-readers .reader-photo {
        height: 280px !important;
    }

    .featured-readers .readers-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 20px !important;
    }

    .featured-readers .default-photo {
        font-size: 50px !important;
    }
}

@media (max-width: 480px) {
    .featured-readers .reader-photo {
        height: 250px !important;
    }

    .featured-readers .readers-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .featured-readers .default-photo {
        font-size: 40px !important;
    }
}

.default-photo {
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #6c757d;
    border: 2px dashed #d4af37;
    border-radius: 10px;
    margin: 10px;
    box-sizing: border-box;
}

.reader-info {
    padding: 25px;
}

.reader-info h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.reader-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.specialties {
    margin-bottom: 15px;
    color: #555;
}

.specialties strong {
    color: #d4af37;
}

.description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.reader-actions {
    text-align: center;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 警告和成功消息 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid;
}

.alert-error {
    background: #ffeaea;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-success {
    background: #eafaf1;
    border-left-color: #28a745;
    color: #155724;
}

.alert-warning {
    background: #fff8e1;
    border-left-color: #ffc107;
    color: #856404;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

/* 认证页面样式 */
.auth-page {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.auth-form {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.reader-register-form {
    max-width: 600px;
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a1a;
    font-size: 28px;
}

/* 认证页面中的链接样式 */
.auth-form .auth-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.link-group {
    margin: 20px 0;
}

.auth-link-item {
    margin: 15px 0;
    color: #666;
    font-size: 0.95rem;
}

.auth-link {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #b8941f;
    text-decoration: underline;
}

.auth-secondary-btn {
    display: inline-block;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    margin: 8px 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.auth-secondary-btn:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

@media (max-width: 480px) {
    .auth-secondary-btn {
        display: block;
        margin: 8px 0;
        width: 100%;
        box-sizing: border-box;
    }
}

/* 搜索区域 */
.search-section {
    margin-bottom: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-form {
    margin-bottom: 20px;
}

.search-input-group {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input-group input:focus {
    outline: none;
    border-color: #d4af37;
}

.search-results-info {
    text-align: center;
    color: #666;
}

.clear-search {
    color: #d4af37;
    text-decoration: none;
    margin-left: 15px;
}

.clear-search:hover {
    text-decoration: underline;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.page-number:hover,
.page-number.active {
    background: #d4af37;
    color: #000;
    border-color: #d4af37;
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* 页面头部 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 42px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 18px;
    color: #666;
}

/* 无结果页面 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.no-results h2 {
    color: #1a1a1a;
    margin-bottom: 15px;
}

.no-results p {
    color: #666;
    font-size: 16px;
}

/* 塔罗师详情页面 */
.reader-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.back-link {
    margin-bottom: 30px;
}

.reader-profile {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 40px;
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.reader-photo-large {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.default-photo-large {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #999;
    border-radius: 15px;
}

.featured-badge-large {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #000;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    text-align: center;
    margin-top: 15px;
}

.reader-info-section h1 {
    font-size: 36px;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.reader-meta-large {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 10px;
}

.meta-item {
    font-size: 16px;
    color: #555;
}

.meta-item strong {
    color: #d4af37;
}

.specialties-section,
.description-section {
    margin-bottom: 25px;
}

.specialties-section h3,
.description-section h3 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 20px;
}

.price-list-section,
.contact-section {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.price-list-section h2,
.contact-section h2 {
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 28px;
}

.price-list-image img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-required {
    text-align: center;
    padding: 40px;
    background: #f8f8f8;
    border-radius: 10px;
}

.login-required p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.contact-preview {
    text-align: center;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 10px;
}

.contact-preview p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.contact-info {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 10px;
}

.contact-details h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
}

.contact-text {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.contact-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #d4af37;
}

.contact-item strong {
    color: #1a1a1a;
}

.contact-value {
    color: #555;
    font-size: 16px;
}

.contact-note {
    margin-top: 20px;
    padding: 15px;
    background: #fff8e1;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.contact-note p {
    margin: 0;
    color: #856404;
}

.related-readers {
    margin-top: 60px;
}

.related-readers h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #1a1a1a;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #fff;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    margin: 0;
    color: #d4af37;
}

.card-body {
    padding: 30px;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background: #f8f8f8;
}

/* 状态标签 */
.status-used {
    background: #dc3545;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.status-expired {
    background: #6c757d;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.status-active {
    background: #28a745;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* 尾部样式 */
.site-footer {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    color: #fff;
    padding: 40px 0 30px;
    margin-top: 60px;
}

/* 首页footer特殊样式 - 去掉上边距 */
.home-page .site-footer {
    margin-top: 0;
}

.footer-content {
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.footer-link {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #8b5cf6;
}

.footer-bottom {
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 旧版footer样式保留用于其他页面 */
.footer-content.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    color: #8b5cf6;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #8b5cf6;
}

/* ========================================
   RESPONSIVE DESIGN - 响应式设计
   ======================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* 移动端Header布局 */
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        gap: 0;
    }

    /* 移动端隐藏桌面端操作区域 */
    .header-actions {
        display: none;
    }

    /* 移动端显示专用菜单项 */
    .mobile-only {
        display: block !important;
    }

    .logo {
        flex: 1;
    }

    .logo h1 {
        font-size: 20px;
        text-align: left;
        margin: 0;
    }

    /* 显示移动端菜单按钮 */
    .mobile-menu-toggle {
        display: flex;
        order: 3;
    }

    /* 移动端导航菜单 - 从右边弹出 */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #000000, #1a1a1a);
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding-top: 80px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .main-nav.mobile-nav-open {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        margin: 0;
    }

    .main-nav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav a {
        display: block;
        padding: 18px 25px;
        font-size: 16px;
        color: #fff;
        border-bottom: none;
        transition: all 0.3s ease;
    }

    .main-nav a:hover {
        background: rgba(212, 175, 55, 0.1);
        color: #d4af37;
        padding-left: 35px;
    }

    .main-nav a::after {
        display: none;
    }

    /* 移动端菜单项样式 */
    .mobile-divider {
        height: 1px;
        background: rgba(212, 175, 55, 0.3);
        margin: 15px 20px;
    }



    .mobile-user {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    }

    .mobile-user-name {
        color: #d4af37;
        font-weight: 600;
        font-size: 16px;
    }

    .mobile-login-btn {
        background: #d4af37;
        color: black;
        padding: 8px 16px;
        border-radius: 4px;
        font-weight: 500;
        font-size: 14px;
        text-decoration: none;
        display: inline-block;
        margin: 0 20px;
    }

    .header-actions {
        order: 2 !important;
        gap: 10px !important;
    }

    .search-dropdown {
        right: -50px;
        min-width: 280px;
    }

    .user-name {
        max-width: 80px;
    }

    .user-toggle {
        padding: 6px 10px;
        font-size: 13px;
    }

    .btn-login {
        padding: 6px 12px;
        font-size: 13px;
    }

    .hero {
        padding: 120px 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 14px;
    }

    .readers-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 20px !important;
    }

    /* 移动端塔罗师照片优化 */
    .reader-photo {
        height: 220px !important;
    }

    .default-photo {
        font-size: 36px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-form {
        padding: 30px 20px;
    }

    /* 移动端Footer优化 */
    .site-footer {
        padding: 40px 0 15px !important;
        margin-top: 40px !important;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        text-align: center !important;
    }

    .footer-section h3,
    .footer-section h4 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }

    .footer-section p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 10px !important;
    }

    .footer-section ul li {
        margin-bottom: 8px !important;
    }

    .footer-section a {
        font-size: 14px !important;
        display: inline-block !important;
        padding: 5px 0 !important;
    }

    .footer-bottom {
        padding-top: 15px !important;
        margin-top: 20px !important;
        font-size: 13px !important;
    }

    .search-input-group {
        flex-direction: column;
    }

    .reader-profile {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .reader-photo-section {
        text-align: center;
    }

    .reader-photo-large,
    .default-photo-large {
        max-width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    .card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 90px 0;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 13px;
        padding: 0 20px;
    }

    /* 小屏幕Footer进一步优化 */
    .site-footer {
        padding: 30px 0 10px !important;
        margin-top: 30px !important;
    }

    .footer-content {
        gap: 20px !important;
    }

    .footer-section h3,
    .footer-section h4 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }

    .footer-section p {
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }

    .footer-section ul li {
        margin-bottom: 6px !important;
    }

    .footer-section a {
        font-size: 13px !important;
        padding: 3px 0 !important;
    }

    .footer-bottom {
        padding-top: 12px !important;
        margin-top: 15px !important;
        font-size: 12px !important;
    }

    .reader-info {
        padding: 20px;
    }

    /* 小屏幕塔罗师照片优化 */
    .readers-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .reader-photo {
        height: 200px !important;
    }

    .default-photo {
        font-size: 40px !important;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .reader-info-section h1 {
        font-size: 28px;
    }

    .card-body,
    .price-list-section,
    .contact-section {
        padding: 20px;
    }

    .reader-meta-large {
        padding: 15px;
    }

    .table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 8px 10px;
    }
}

/* 打印样式 */
@media print {
    .site-header,
    .site-footer,
    .btn,
    .pagination,
    .search-section {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    .reader-card,
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 占卜方向选择样式 */
.specialty-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    padding-left: 25px;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #d4af37;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #d4af37;
    border-color: #d4af37;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-specialty {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.custom-specialty label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.custom-specialty input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* 文件上传样式 */
input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: #d4af37;
    background: #fff;
}

input[type="file"]:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* 响应式设计 - 占卜方向选择 */
@media (max-width: 768px) {
    .specialty-options {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .checkbox-label {
        font-size: 13px;
    }
}
