/* global-styles.css - 所有页面共享的全局样式 */
:root {
    /* 粉色主题变量 */
    --primary-color: #ff4081;
    --primary-light: #ff79b0;
    --primary-dark: #c60055;
    --secondary-color: #ff80ab;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(255, 64, 129, 0.2);
    
    /* 交互控制变量 */
    --interactive-scale: 0.98;
    --interactive-transition: all 0.2s cubic-bezier(0.2, 0.8, 0.4, 1);
}

/* 基础重置和全局样式 */
body {
    font-family: "3", 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

@font-face {
    font-family: "3";
    src: url("./assets/3.ttf");
}

/* 毛玻璃基础效果 */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

/* 按钮基础样式 */
.mdui-btn {
    border-radius: 50px !important;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--interactive-transition) !important;
}

/* 粉色主题按钮样式 */
.mdui-btn.mdui-text-color-theme-accent {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 182, 193, 0.5) !important;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.15) !important;
    color: #ff1493 !important;
}

/* 按钮点击动画效果 */
.mdui-btn.mdui-text-color-theme-accent {
    position: relative;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transform-origin: center;
}

/* PC端：鼠标悬停效果 */
@media (min-width: 769px) {
    .mdui-btn.mdui-text-color-theme-accent:hover {
        background: rgba(255, 255, 255, 0.95) !important;
        border-color: #ff69b4 !important;
        transform: translateY(-2px) scale(0.98) !important;
        box-shadow: 
            0 8px 20px rgba(255, 105, 180, 0.25),
            inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
}

/* 移动端：点击动画效果 */
.mdui-btn.mdui-text-color-theme-accent:active {
    transform: scale(0.95) !important;
    box-shadow: 
        0 4px 8px rgba(255, 105, 180, 0.15),
        inset 0 3px 6px rgba(0, 0, 0, 0.15) !important;
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(255, 182, 193, 0.7) !important;
}

/* 为所有状态下的按钮添加内阴影效果 */
.mdui-btn.mdui-text-color-theme-accent::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transition: box-shadow 0.2s ease;
}

/* 点击时内阴影加深 */
.mdui-btn.mdui-text-color-theme-accent:active::after {
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* 确保搜索对话框中的按钮也有同样效果 */
#search .mdui-btn {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

#search .mdui-btn:active {
    transform: scale(0.95) !important;
    box-shadow: 
        0 4px 8px rgba(255, 105, 180, 0.15),
        inset 0 3px 6px rgba(0, 0, 0, 0.15) !important;
}

/* 淡粉色波纹效果 */
.mdui-ripple-wave {
    background: rgba(255, 182, 193, 0.6) !important;
    animation: mdui-ripple-pink 0.6s ease-out !important;
}

/* 淡粉色涟漪动画 */
@keyframes mdui-ripple-pink {
    0% {
        opacity: 0.8;
        transform: scale(0);
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* 针对粉色主题按钮的特殊波纹效果 */
.mdui-btn.mdui-text-color-theme-accent .mdui-ripple-wave,
.mdui-btn.mdui-color-theme-accent .mdui-ripple-wave {
    background: rgba(255, 105, 180, 0.5) !important;
    animation: mdui-ripple-pink-accent 0.5s ease-out !important;
}

@keyframes mdui-ripple-pink-accent {
    0% {
        opacity: 0.7;
        transform: scale(0);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(2.2);
    }
}

/* 确保波纹效果不被遮挡 */
.mdui-btn {
    position: relative;
    overflow: hidden;
}

/* 为粉色主题按钮添加更明显的涟漪 */
.mdui-btn.mdui-text-color-theme-accent:active .mdui-ripple-wave-filled {
    background: rgba(255, 105, 180, 0.3) !important;
    animation: mdui-ripple-pink-filled 0.4s ease-out !important;
}

@keyframes mdui-ripple-pink-filled {
    0% {
        opacity: 0.4;
        transform: scale(0);
    }
    70% {
        opacity: 0.2;
    }
    100% {
        opacity: 0;
        transform: scale(1.8);
    }
}

/* 鼠标悬停时的预涟漪效果 */
.mdui-btn.mdui-text-color-theme-accent:hover .mdui-ripple-wave {
    background: rgba(255, 182, 193, 0.2) !important;
}

.mdui-btn-raised {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 5px 20px rgba(255, 64, 129, 0.3) !important;
}

/* 链接样式 */
a {
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-light) !important;
    text-decoration: underline;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 240, 245, 0.8);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffb6c1, #ff69b4);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
}

/* 加载动画 */
.mdui-spinner-colorful {
    color: var(--primary-color) !important;
}

/* 输入框样式 */
.mdui-textfield-input {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 182, 193, 0.5) !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.mdui-textfield-input:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2) !important;
}

/* 卡片点击效果 */
.card-click-effect,
.glass-card,
.mdui-card,
.link-card,
.doc-card,
.search-result-item,
.pc-card,
.guide-card,
.site-info-card,
.info-card,
.stat-card {
    position: relative;
    transition: var(--interactive-transition) !important;
    transform-origin: center;
    overflow: hidden;
}

/* 响应式基础 */
@media (max-width: 768px) {
    .mdui-typo-display-1 {
        font-size: 2rem !important;
    }
    
    .mdui-typo-title {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 480px) {
    .mdui-typo-display-1 {
        font-size: 1.8rem !important;
    }
}