/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #808080; /* 灰色背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s ease;
}

/* 主容器 */
.main-container {
    width: 700px; /* 进一步加宽框的宽度 */
    background-color: #ffffff; /* 白色背景 */
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 颜色盒子 */
.color-box {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* 颜色预览区域 */
.color-preview {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 玻璃效果背景 */
.color-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(10px);
    z-index: 1;
}

/* 取色按钮 */
.pick-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.pick-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.pick-btn:active {
    transform: scale(0.98);
}

/* 颜色信息区域 */
.color-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.info-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.info-item:active {
    transform: translateY(0);
}

.info-label {
    font-size: 16px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 60px;
}

.info-value {
    font-size: 20px;
    color: #343a40;
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', monospace;
    user-select: all;
    text-align: right;
    flex: 1;
    margin-left: 20px;
    white-space: nowrap; /* 防止换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 溢出时显示省略号 */
}

/* 取色按钮提示 */
.pick-btn::after {
    content: '点击取色';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 15px;
    white-space: pre;
    text-align: center;
    font-size: 12px;
    color: #0c0c0c;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    width: 200px;
    z-index: 10;
}

.pick-btn:hover::after {
    opacity: 1;
}

/* 按钮加载状态 */
.pick-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pick-btn:disabled:hover {
    transform: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 750px) {
    .main-container {
        width: 100%;
        max-width: 700px;
        padding: 25px;
    }
    
    .color-box {
        flex-direction: column;
    }
    
    .color-preview {
        width: 200px;
        height: 200px;
    }
    
    .pick-btn {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .info-value {
        text-align: left;
        margin-left: 0;
        font-size: 18px;
        white-space: normal; /* 在小屏幕上允许换行 */
        overflow: visible;
    }
}
