/* 工具站主样式 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

html, body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* 首页 Hero 区域 */
.home-hero {
    background: radial-gradient(1200px 600px at -10% -10%, #0a58ca 10%, rgba(13, 110, 253, 0.85) 35%, #0d6efd 60%, #0b5ed7 100%),
                linear-gradient(135deg, #0d6efd, #0b5ed7) !important;
    color: #ffffff;
    min-height: 520px;
}

.home-hero--bleed {
    /* 将容器拉伸为全屏宽度（出血） */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
}

.announcement-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    backdrop-filter: blur(2px);
}

.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 800;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
}

.hero-cta {
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 600;
}

.home-hero .search-bar .form-control {
    height: 56px;
}

.home-hero-graphic {
    height: 260px;
    border-radius: 16px;
    background:
      radial-gradient(120px 120px at 20% 30%, rgba(255,255,255,0.25), rgba(255,255,255,0) 60%),
      radial-gradient(140px 140px at 60% 60%, rgba(255,255,255,0.2), rgba(255,255,255,0) 60%),
      radial-gradient(100px 100px at 80% 20%, rgba(255,255,255,0.15), rgba(255,255,255,0) 60%);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.hero-graphic-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

.hero-icon-1 {
    top: 15%;
    left: 20%;
    animation-delay: 0s;
}

.hero-icon-2 {
    top: 50%;
    right: 15%;
    animation-delay: 0.6s;
}

.hero-icon-3 {
    bottom: 20%;
    left: 15%;
    animation-delay: 1.2s;
}

.hero-icon-4 {
    top: 30%;
    right: 30%;
    animation-delay: 0.3s;
}

.hero-icon-5 {
    bottom: 35%;
    right: 25%;
    animation-delay: 0.9s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-10px) scale(1.05);
        opacity: 1;
    }
}

.hero-icon:hover {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.trusted-by {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 16px;
}

.trusted-logos {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.trusted-logo { display: inline-block; height: 28px; opacity: 0.9; filter: grayscale(1) brightness(2); }
.trusted-logo--harvard { width: 110px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 60"><text x="0" y="42" font-family="Inter,Arial" font-weight="700" font-size="40" fill="white">Harvard</text></svg>') no-repeat center/contain; }
.trusted-logo--nvidia { width: 100px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 60"><text x="0" y="42" font-family="Inter,Arial" font-weight="800" font-size="40" fill="white">NVIDIA</text></svg>') no-repeat center/contain; }
.trusted-logo--meta { width: 90px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 60"><text x="0" y="42" font-family="Inter,Arial" font-weight="800" font-size="40" fill="white">Meta</text></svg>') no-repeat center/contain; }
.trusted-logo--notion { width: 100px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 60"><text x="0" y="42" font-family="Inter,Arial" font-weight="800" font-size="40" fill="white">Notion</text></svg>') no-repeat center/contain; }
.trusted-logo--coursera { width: 120px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 60"><text x="0" y="42" font-family="Inter,Arial" font-weight="800" font-size="40" fill="white">Coursera</text></svg>') no-repeat center/contain; }

/* 分类 Chip */
.category-chip {
    border-radius: 999px;
    padding: 6px 12px;
}

/* 工具卡片样式 */
.tool-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.tool-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.tool-meta {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.tool-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tool-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 搜索建议样式 */
#searchSuggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

#searchSuggestions .card-body {
    padding: 0;
}

#searchSuggestions .border {
    border: none !important;
    border-bottom: 1px solid #e9ecef !important;
}

#searchSuggestions .border:last-child {
    border-bottom: none !important;
}

/* 工具详情页样式 */
.tool-header {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tool-header .lead {
    font-size: 1.2rem;
    opacity: 0.9;
}

.tool-features {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.tool-features h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.tool-features ul {
    margin: 0;
    padding-left: 1.5rem;
}

.tool-features li {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

/* 工具表单样式 */
.tool-form {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.tool-form .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.tool-form .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.tool-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.tool-form .btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* 结果展示样式 */
.result-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    margin-top: 2rem;
}

.result-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.result-info .row {
    margin: 0;
}

.result-info .col-6 {
    padding: 0.5rem;
}

.result-info .label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.result-info .value {
    font-size: 1rem;
    color: var(--dark-color);
    font-weight: 600;
}

/* 加载动画 */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .tool-header .lead {
        font-size: 1rem;
    }
    
    .tool-form {
        padding: 1.5rem;
    }
    
    .result-container {
        padding: 1.5rem;
    }
}

/* 工具分类样式 */
.category-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

.category-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-weight: 600;
}

/* 统计信息样式 */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    text-align: center;
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 错误页面样式 */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
}

.error-container i {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-container h3 {
    color: #6c757d;
    margin-bottom: 1rem;
}

.error-container p {
    color: #6c757d;
    margin-bottom: 2rem;
}
