/* 精美的设备选择器样式 - 明亮主题版本 */

/* 设备选择器容器 */
.device-selector {
    margin-bottom: 24px;
}

.device-selector > label {
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: block;
    font-size: 15px;
}

/* 设备选项网格布局 */
.device-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* 单个设备选项 */
.device-option {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 设备选项标签 - 明亮背景 */
.device-option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 背景装饰 */
.device-option-label::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.05) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
    pointer-events: none;
}

/* 悬停效果 - 浅蓝色背景 */
.device-option:hover .device-option-label {
    border-color: #93c5fd;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.12);
}

.device-option:hover .device-option-label::before {
    transform: scale(1);
}

/* 选中状态 - 蓝色渐变背景 */
.device-option input[type="radio"]:checked ~ .device-option-label {
    border-color: #4A90E2;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

/* 设备图标 */
.device-icon {
    font-size: 36px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    line-height: 1;
}

.device-option:hover .device-icon,
.device-option input[type="radio"]:checked ~ .device-option-label .device-icon {
    transform: scale(1.08);
}

/* 设备信息容器 */
.device-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 设备名称 */
.device-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

/* 设备描述 */
.device-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}

/* 选中标记 */
.device-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: #4A90E2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.device-option input[type="radio"]:checked ~ .device-option-label .device-check {
    opacity: 1;
    transform: scale(1);
    animation: checkAnimation 0.4s ease;
}

@keyframes checkAnimation {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 特殊的图标样式 */
.device-option[data-device="ios"] .device-icon {
    color: #000000;
}

.device-option[data-device="android"] .device-icon {
    color: #3DDC84;
}

.device-option[data-device="both"] .device-icon {
    color: #4A90E2;
}

/* 移动端响应式 */
@media (max-width: 640px) {
    .device-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .device-option-label {
        flex-direction: row;
        padding: 16px 20px;
        justify-content: flex-start;
        gap: 16px;
    }
    
    .device-icon {
        font-size: 28px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .device-info {
        text-align: left;
        align-items: flex-start;
        flex: 1;
    }
    
    .device-name {
        font-size: 14px;
    }
    
    .device-desc {
        font-size: 12px;
    }
    
    .device-check {
        top: 50%;
        transform: translateY(-50%) scale(0.5);
    }
    
    .device-option input[type="radio"]:checked ~ .device-option-label .device-check {
        transform: translateY(-50%) scale(1);
    }
}

/* 禁用状态 */
.device-option.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.device-option.disabled .device-option-label {
    background: #f9fafb;
    border-color: #e5e7eb;
}

/* 加载状态 */
.device-selector.loading .device-options {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.device-selector.loading .device-options::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid #4A90E2;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}