/* 组件样式 */
.clock-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.time {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.date {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.9;
}

/* 组件布局 */
.clock-section,
.search-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
}

/* 统一的搜索框毛玻璃效果 */
.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition-fast);
    position: relative;
    box-shadow: var(--shadow-md);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    background: var(--glass-bg-hover);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
    pointer-events: none;
}

/* 快捷访问组件样式 */
.quick-access-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

/* 桌面默认4列 */
@media screen and (min-width: 1024px) {
    .quick-access-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.shortcut-btn {
    text-decoration: none;
    color: inherit;
}

.shortcut-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.shortcut-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.9;
}

/* 统一的添加快捷方式按钮毛玻璃效果 */
.add-shortcut-btn {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 2px dashed var(--glass-border-hover);
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    box-shadow: var(--shadow-md);
}



.add-shortcut-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--primary-color);
    border-style: solid;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

/* 表单样式 */
#shortcutForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 删除按钮样式 */
.delete-shortcut {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: rgba(255, 107, 107, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 50%;
    color: #ff6b6b;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}



.shortcut-btn:hover .delete-shortcut {
    display: flex;
}

.delete-shortcut:hover {
    background: rgba(255, 107, 107, 0.25);
    border-color: rgba(255, 107, 107, 0.6);
    color: #ff5252;
    box-shadow: var(--shadow-md);
}

.delete-shortcut:active {
    background: rgba(255, 107, 107, 0.35);
    border-color: rgba(255, 107, 107, 0.8);
    color: #ff1744;
}

/* ===== 搜索引擎选择模态框样式 ===== */
#searchEngineModal .modal-header h3 {
    margin-bottom: 0.5rem;
    text-align: center;
}

/* 搜索引擎容器 */
.search-engine-container {
    margin: 1.5rem 0;
    max-height: 50vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* 搜索引擎网格 - 宽屏优化 */
.search-engine-grid {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

/* 移动端:单列布局 */
@media screen and (max-width: 767px) {
    .search-engine-grid {
        grid-template-columns: 1fr;
    }
}

/* 平板端:双列布局 */
@media screen and (min-width: 768px) and (max-width: 1199px) {
    .search-engine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 宽屏端:三列布局 */
@media screen and (min-width: 1200px) {
    .search-engine-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 超大屏:四列布局 */
@media screen and (min-width: 1600px) {
    .search-engine-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 统一的搜索引擎项目毛玻璃效果 */
.search-engine-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(222, 226, 230, 0.8);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    box-sizing: border-box;
    margin: 0.25rem;
    box-shadow: var(--shadow-sm);
}



.search-engine-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* 搜索引擎图标 */
.search-engine-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

/* 搜索引擎信息 */
.search-engine-info {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-engine-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.search-engine-desc {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    font-weight: 400;
}

/* 搜索引擎特定颜色和样式 */
.search-engine-item[data-engine="google"] .search-engine-icon {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc05 100%);
    color: white;
}

.search-engine-item[data-engine="baidu"] .search-engine-icon {
    background: linear-gradient(135deg, #2932e1 0%, #1e88e5 100%);
    color: white;
}

.search-engine-item[data-engine="bing"] .search-engine-icon {
    background: linear-gradient(135deg, #00bcf2 0%, #0078d4 100%);
    color: white;
}

/* 选中状态 */
.search-engine-item.selected {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.5);
}

.search-engine-item.selected::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 3;
}

.search-engine-item.selected .search-engine-name::after {
    content: ' (默认)';
    color: rgba(76, 175, 80, 0.9);
    font-size: 0.8em;
    font-weight: 500;
}

/* 响应式优化 */
@media screen and (max-width: 768px) {
    .search-engine-item {
        padding: 1.25rem 0.75rem;
        min-height: 120px;
    }

    .search-engine-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .search-engine-name {
        font-size: 1rem;
    }

    .search-engine-desc {
        font-size: 0.8rem;
    }
}

/* 滚动条样式 */
.search-engine-container::-webkit-scrollbar {
    width: 6px;
}

.search-engine-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.search-engine-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.search-engine-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ===== 天气组件样式 ===== */
.weather-widget {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    min-width: 200px;
}

.weather-widget:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg);
}

.weather-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.weather-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.weather-info {
    flex: 1;
    min-width: 0;
}

.weather-temp {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.weather-city {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weather-settings {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.weather-settings:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}



/* 城市选择模态框样式 */
.city-search-container {
    margin: 1.5rem 0;
    max-height: 50vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* 统一的城市搜索输入框毛玻璃效果 */
.city-search-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    background: rgba(248, 249, 250, 0.9);
    border: 2px solid rgba(233, 236, 239, 0.8);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.city-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.city-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 统一的城市项目毛玻璃效果 */
.city-item {
    padding: 0.75rem 1rem;
    background: rgba(248, 249, 250, 0.9);
    border: 1px solid rgba(222, 226, 230, 0.8);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.city-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}



.city-name {
    font-weight: 500;
    color: var(--text-primary);
}

.city-country {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.city-coords {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .weather-widget {
        top: 1rem;
        right: 1rem;
        min-width: 160px;
    }

    .weather-content {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .weather-icon {
        font-size: 1.5rem;
    }

    .weather-temp {
        font-size: 1.25rem;
    }

    .weather-city {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 480px) {
    .weather-widget {
        position: relative;
        top: auto;
        right: auto;
        margin: 1rem auto;
        width: fit-content;
    }
}