/* 珍珠评估工具样式 */

/* 基础样式 */
body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #0f172a;
}

/* 导航链接样式 */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #81c2e7;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.text-primary::after {
    width: 100%;
}

/* 滑块样式 */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: #e2e8f0;
    height: 0.5rem;
    border-radius: 9999px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background-color: #81c2e7;
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 9999px;
    margin-top: -0.5rem;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(129, 194, 231, 0.2);
}

input[type="range"]::-moz-range-track {
    background: #e2e8f0;
    height: 0.5rem;
    border-radius: 9999px;
}

input[type="range"]::-moz-range-thumb {
    background-color: #81c2e7;
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 9999px;
    border: none;
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(129, 194, 231, 0.2);
}

/* 选项按钮样式 */
.shape-option:hover,
.color-option:hover,
.gloss-option:hover,
.surface-option:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.color-option {
    position: relative;
}

.color-option:hover::after,
.color-option.border-primary::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid #81c2e7;
    border-radius: 50%;
}

/* 进度条动画 */
@keyframes progressBar {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* 卡片悬停效果 */
.bg-white.rounded-xl:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 按钮动画 */
#nextStep {
    position: relative;
    overflow: hidden;
}

#nextStep::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

#nextStep:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .md\:grid-cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .shape-option,
    .gloss-option {
        min-width: auto;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid rgba(129, 194, 231, 0.3);
    border-radius: 50%;
    border-top: 3px solid #81c2e7;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 图片加载过渡 */
img {
    transition: opacity 0.5s ease;
}

img.loading {
    opacity: 0;
}

/* 选择样式 */
::selection {
    background-color: rgba(129, 194, 231, 0.3);
    color: #0f172a;
}

/* 禁用状态 */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 焦点样式 */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #81c2e7;
    outline-offset: 2px;
}

/* 骨架屏效果 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 卡片阴影效果 */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 珍珠图片特殊效果 */
.hero-image {
    filter: brightness(0.9) contrast(1.1);
}

/* 滚动动画 */
.scroll-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animation.visible {
    opacity: 1;
    transform: translateY(0);
}