/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 高级动态背景 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    background: #0a0a16;
    position: relative;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(100, 116, 255, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 75% 25%, rgba(255, 100, 200, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 25% 75%, rgba(100, 255, 200, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 75% 75%, rgba(255, 200, 100, 0.05) 0%, transparent 30%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 10px);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(100, 116, 255, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 80% 30%, rgba(255, 100, 200, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 30% 70%, rgba(100, 255, 200, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 70% 90%, rgba(255, 200, 100, 0.1) 0%, transparent 30%);
    z-index: -1;
    animation: pulseBackground 8s ease-in-out infinite;
}

/* 背景网格装饰 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

/* 粒子效果容器 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}

main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 整合控件和输入区域的容器 */
.controls-inputs-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    box-sizing: border-box;
}

/* 高级头部样式 */
header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    position: relative;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
    border-radius: 2px;
    animation: glow 3s ease-in-out infinite;
}

header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: clamp(2px, 0.5vw, 3px);
    text-shadow: 
        0 0 10px rgba(0, 240, 255, 0.7),
        0 0 20px rgba(0, 240, 255, 0.5),
        0 0 30px rgba(0, 240, 255, 0.3),
        0 0 50px rgba(0, 240, 255, 0.1);
    animation: titleFloat 4s ease-in-out infinite, titleGlow 3s ease-in-out infinite alternate;
    position: relative;
    display: inline-block;
    line-height: 1.2;
}

header h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;
    filter: blur(15px);
    opacity: 0.7;
}

header p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: #b0b0ff;
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(176, 176, 255, 0.5);
    animation: subtitleFade 4s ease-in-out infinite;
    max-width: 800px;
    margin: 0 auto;
}

/* 高级玻璃态主容器 */
main {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: clamp(1.5rem, 4vw, 2rem);
    width: 100%;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    animation: shine 6s infinite linear;
}

/* 高级动画关键帧 */
@keyframes titleGlow {
    0% {
        text-shadow: 
            0 0 10px rgba(0, 240, 255, 0.7),
            0 0 20px rgba(0, 240, 255, 0.5),
            0 0 30px rgba(0, 240, 255, 0.3);
    }
    100% {
        text-shadow: 
            0 0 15px rgba(0, 240, 255, 0.9),
            0 0 30px rgba(0, 240, 255, 0.7),
            0 0 50px rgba(0, 240, 255, 0.5),
            0 0 80px rgba(0, 240, 255, 0.3);
    }
}

@keyframes subtitleFade {
    0%, 100% {
        opacity: 0.9;
        transform: translateY(0);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-3px);
    }
}

/* 高级颜色预览区域 */
.color-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
    position: relative;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.color-display {
    width: 100%;
    height: clamp(180px, 40vh, 240px);
    border-radius: 20px;
    background-color: #FFFFFF;
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    box-sizing: border-box;
}

.color-display::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 60%
    );
    transform: rotate(45deg);
    animation: shimmer 8s infinite linear;
    pointer-events: none;
}

.color-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    min-height: 150px;
}

.color-info:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

#hexCode {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: bold;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#hexCode::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.5s ease;
}

#hexCode:hover::before {
    left: 100%;
}

/* 高级按钮样式 */
.copy-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #00f0ff, #0066ff);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(0, 240, 255, 0.4),
        0 4px 15px rgba(0, 240, 255, 0.3);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg);
    width: 100%;
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.5s ease;
    z-index: 1;
}

.copy-btn:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-5px);
    box-shadow: 
        0 12px 30px rgba(0, 240, 255, 0.6),
        0 8px 20px rgba(0, 240, 255, 0.4),
        0 0 40px rgba(0, 240, 255, 0.2);
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:active {
    transform: perspective(1000px) rotateX(0deg) translateY(0);
    box-shadow: 
        0 4px 15px rgba(0, 240, 255, 0.4),
        0 0 20px rgba(0, 240, 255, 0.2);
}

.copy-btn span {
    position: relative;
    z-index: 2;
    display: inline-block;
    transition: transform 0.3s ease;
}

.copy-btn:hover span {
    transform: scale(1.05);
}

/* 复制按钮动画 */
.copy-btn.copied {
    animation: copySuccess 0.6s ease-out;
}

@keyframes copySuccess {
    0% {
        transform: scale(1);
        background: linear-gradient(135deg, #00f0ff, #0066ff);
    }
    50% {
        transform: scale(1.1);
        background: linear-gradient(135deg, #4CAF50, #45a049);
    }
    100% {
        transform: scale(1);
        background: linear-gradient(135deg, #00f0ff, #0066ff);
    }
}

/* 网格移动动画 */
@keyframes gridMove {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(-40px) translateX(-40px);
    }
}

/* 高级颜色控件区域 */
.color-controls {
    background: rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.slider-group {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    position: relative;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.3s ease;
    grid-template-areas:
        "label slider value";
}

.slider-group:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-group label {
    grid-area: label;
    font-weight: 600;
    color: #b0b0ff;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(176, 176, 255, 0.3);
    text-align: right;
}

.slider {
    grid-area: slider;
    height: 8px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.7),
        0 0 30px rgba(255, 255, 255, 0.5),
        0 0 5px rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.9);
    transform: scale(1) rotate(0deg);
    position: relative;
    z-index: 1;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.4) rotate(15deg);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.9),
        0 0 40px rgba(255, 255, 255, 0.7),
        0 0 10px rgba(255, 255, 255, 0.9);
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.slider-group span {
    grid-area: value;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    padding-left: 0.5rem;
}

/* 为RGB滑块设置颜色 */
#redSlider::-webkit-slider-thumb {
    background: #FF5252;
    box-shadow: 
        0 0 10px #FF5252,
        0 0 20px rgba(255, 82, 82, 0.5);
}

#greenSlider::-webkit-slider-thumb {
    background: #4CAF50;
    box-shadow: 
        0 0 10px #4CAF50,
        0 0 20px rgba(76, 175, 80, 0.5);
}

#blueSlider::-webkit-slider-thumb {
    background: #2196F3;
    box-shadow: 
        0 0 10px #2196F3,
        0 0 20px rgba(33, 150, 243, 0.5);
}

#redSlider {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), #FF5252);
}

#greenSlider {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), #4CAF50);
}

#blueSlider {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), #2196F3);
}

/* HSL滑块颜色 */
#hueSlider {
    background: linear-gradient(to right, 
        hsl(0, 100%, 50%),
        hsl(60, 100%, 50%),
        hsl(120, 100%, 50%),
        hsl(180, 100%, 50%),
        hsl(240, 100%, 50%),
        hsl(300, 100%, 50%),
        hsl(360, 100%, 50%)
    );
}

#hueSlider::-webkit-slider-thumb {
    background: #ffffff;
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(255, 255, 255, 0.5);
}

#saturationSlider {
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.2), 
        rgba(255, 0, 0, 0.8)
    );
}

#lightnessSlider {
    background: linear-gradient(to right, 
        rgba(0, 0, 0, 0.8), 
        rgba(255, 255, 255, 0.2), 
        rgba(255, 255, 255, 0.8)
    );
}

/* 高级固定颜色区域 */
.fixed-colors {
    background: rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.fixed-colors h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.fixed-colors-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 10px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    justify-items: center;
}

.fixed-color {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.fixed-color:hover {
    transform: scale(1.2) rotate(5deg) translateY(-3px);
    box-shadow: 
        0 0 20px currentColor,
        0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

.fixed-color::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.fixed-color:hover::before {
    transform: translateX(100%);
}

/* 颜色输入区域 */
.color-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.input-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #00f0ff, #0066ff);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-group:focus-within::before {
    opacity: 1;
}

.input-group label {
    font-weight: 600;
    color: #b0b0ff;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(176, 176, 255, 0.3);
}

.input-group input {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 1rem;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.input-group input:focus {
    outline: none;
    border-color: #00f0ff;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(0, 240, 255, 0.3);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 颜色历史记录 */
.color-history {
    background: rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.color-history h3 {
    margin-bottom: 20px;
    color: #b0b0ff;
    font-size: 1.3rem;
    text-shadow: 0 0 5px rgba(176, 176, 255, 0.3);
    position: relative;
    display: inline-block;
}

.color-history h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00f0ff, transparent);
    border-radius: 2px;
}

.history-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 0;
    justify-content: center;
    min-height: 150px;
    align-content: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.history-color {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.history-color::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.history-color:hover {
    transform: scale(1.2) translateY(-5px);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.history-color:hover::before {
    left: 100%;
}

/* 通知消息 */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, #00f0ff, #0066ff);
    color: white;
    padding: 18px 30px;
    border-radius: 12px;
    box-shadow: 
        0 6px 20px rgba(0, 240, 255, 0.4),
        0 0 30px rgba(0, 240, 255, 0.2);
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
    font-weight: 600;
    font-size: 1.1rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notification::before {
    content: '✓';
    margin-right: 10px;
    font-weight: bold;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 3rem;
    color: #b0b0ff;
    opacity: 0.8;
    padding: 1.5rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
    border-radius: 1px;
}

/* 平板设备响应式设计 */
@media (min-width: 769px) and (max-width: 992px) {
    .color-preview {
        grid-template-columns: 1fr 1fr;
    }
    
    .controls-inputs-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .fixed-colors-container {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    
    .history-container {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}

/* 桌面设备响应式设计 */
@media (min-width: 993px) and (max-width: 1200px) {
    .color-preview {
        grid-template-columns: 1fr 1fr;
    }
    
    .controls-inputs-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .fixed-colors-container {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .history-container {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* 大屏幕设备响应式设计 */
@media (min-width: 1201px) {
    .color-preview {
        grid-template-columns: 1fr 1fr;
    }
    
    .controls-inputs-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .fixed-colors-container {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .history-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* 移动设备响应式设计 */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    main {
        grid-template-columns: 1fr;
        padding: 1rem;
        margin: 0;
        gap: 1rem;
    }
    
    .color-preview {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .color-info {
        min-height: auto;
    }
    
    .controls-inputs-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .color-display {
        height: 150px;
    }
    
    .color-info {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .color-code {
        font-size: 1.25rem;
        padding: 0.75rem 1rem;
    }
    
    .copy-btn {
        padding: 0.75rem 1rem;
    }
    
    /* 移动设备上的滑块组布局优化 */
    .slider-group {
        grid-template-columns: 1fr;
        grid-template-areas:
            "label"
            "slider"
            "value";
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .slider-group label {
        text-align: center;
        font-size: 0.9rem;
    }
    
    .slider-group span {
        text-align: center;
        padding-left: 0;
        font-size: 0.9rem;
    }
    
    .slider {
        height: 8px;
    }
    
    .color-inputs {
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .fixed-colors {
        padding: 1rem;
    }
    
    .fixed-colors-container {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 0.5rem;
    }
    
    .fixed-color {
        width: 35px;
        height: 35px;
    }
    
    .history-container {
        justify-content: center;
        gap: 10px;
        min-height: 120px;
    }
    
    .history-color {
        width: 45px;
        height: 45px;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    footer {
        margin-top: 1.5rem;
        padding: 1rem;
    }
}

/* 动画效果 */
@keyframes pulseBackground {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes glow {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(-50%) scaleX(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1.2);
    }
}

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }
    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* 粒子动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.2;
    }
}

/* 页面加载动画 */
body {
    opacity: 0;
    transition: opacity 1s ease;
}

body.loaded {
    opacity: 1;
}

/* 为滑块添加焦点状态 */
.slider:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

/* 为输入框添加过渡效果 */
.input-group input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 为颜色预览添加鼠标悬停效果 */
.color-display:hover {
    transform: scale(1.01);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 255, 255, 0.1);
}

/* 为整个控制面板添加呼吸效果 */
.color-controls {
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15),
                    0 0 0 1px rgba(255, 255, 255, 0.08);
    }
    50% {
        box-shadow: 0 8px 40px 0 rgba(31, 38, 135, 0.25),
                    0 0 0 1px rgba(255, 255, 255, 0.12);
    }
}