:root {
    --primary-color: #003366;
    --primary-light: #004080;
    --primary-dark: #002244;
    --secondary-color: #0066cc;
    --accent-color: #00bfff;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f8f9fa;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.custom-navbar {
    background-color: var(--primary-color) !important;
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.custom-navbar .navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    text-decoration: none;
}

.custom-navbar .logo-icon {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.custom-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    margin-right: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
    color: var(--text-light) !important;
}

.custom-navbar .dropdown-menu {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
    margin-top: 0.25rem;
}

.custom-navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
}

.custom-navbar .dropdown-item:hover,
.custom-navbar .dropdown-item:focus {
    background-color: rgba(0, 191, 255, 0.15);
    color: var(--text-light);
}

.custom-navbar .dropdown-item:active {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.custom-navbar .dropdown-divider {
    border-top-color: var(--border-color);
}

.custom-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.custom-navbar .nav-link:hover::after,
.custom-navbar .nav-link.active::after {
    width: 100%;
}

.search-form {
    margin-right: 1rem;
}

.search-input {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.3);
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.15);
}

.search-btn {
    border-radius: 20px;
    border-color: var(--text-light);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

.user-actions .login-btn {
    border-radius: 20px;
    border-color: var(--text-light);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.user-actions .login-btn:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

.user-actions .register-btn {
    border-radius: 20px;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.user-actions .register-btn:hover {
    background-color: #00a8e6;
    border-color: #00a8e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.4);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.main-content {
    padding-top: 80px;
    flex: 1;
}

.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-light);
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding-left: 1.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.hero-buttons .btn {
    border-radius: 30px;
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.hero-buttons .btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.hero-buttons .btn-primary:hover {
    background-color: #00a8e6;
    border-color: #00a8e6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.4);
}

.hero-buttons .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-image img {
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.8s ease 0.2s both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.solutions-section {
    padding: 60px 0;
}

.solutions-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.solutions-section p {
    font-size: 1.1rem;
    color: #666;
}

.solution-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.1);
    transition: all 0.3s ease;
    background-color: white;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 51, 102, 0.2);
}

.solution-card .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.solution-card .card-text {
    color: #666;
    line-height: 1.8;
}

.solution-card .card-link {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.solution-card .card-link:hover {
    color: var(--secondary-color);
}

.products-section {
    padding: 60px 0;
    background-color: rgba(0, 51, 102, 0.05);
}

.products-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.products-section p {
    font-size: 1.1rem;
    color: #666;
}

.product-item {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.1);
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 51, 102, 0.2);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-item p {
    color: #666;
    font-size: 0.95rem;
}

.about-section {
    padding: 60px 0;
}

.about-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-section p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.about-features li {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.about-image img {
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 51, 102, 0.15);
}

.custom-footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    text-align: left;
}

.footer-divider hr {
    margin: 0;
    border-color: rgba(255, 255, 255, 0.2);
}

.footer-cloud {
    text-align: right;
}

.custom-footer p {
    margin: 0;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

@media (max-width: 992px) {
    .search-form {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .user-actions {
        margin-left: 0 !important;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        margin-bottom: 1rem;
        margin-right: 0;
    }
}

/* ========== 标签芯片组件 - 用于上品页面 ========== */
.tag-input-container {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: #fff;
    cursor: text;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    min-height: 45px;
}

.tag-input-container:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.25rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    background: #003366;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    gap: 0.3rem;
    animation: chipFadeIn 0.2s ease;
}

@keyframes chipFadeIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.tag-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.15rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.15s ease;
}

.tag-remove:hover {
    color: #fff;
}

.tag-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0;
    min-width: 120px;
    flex: 1;
    background: transparent !important;
}

.tag-input::placeholder {
    color: #adb5bd;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .custom-footer .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copyright,
    .footer-cloud {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .footer-divider {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }

    .solutions-section h2,
    .products-section h2,
    .about-section h2 {
        font-size: 2rem;
    }
}

/* ========== 上品页面 - 刷新图标旋转动画 ========== */
.spin-animation {
    animation: spinOnce 0.6s ease;
}

@keyframes spinOnce {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ========== 工具箱页面 ========== */
.tool-group {
    padding: 0.5rem 0;
}

.tool-group-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-group-title i {
    color: var(--accent-color);
}

.tool-group hr {
    margin: 0.5rem 0 1.25rem 0;
    opacity: 0.15;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.1rem 0.5rem;
    border: 1px solid #e3e6ec;
    border-radius: 0.75rem;
    background-color: #fff;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.04);
}

.tool-btn i {
    font-size: 1.6rem;
    color: var(--primary-color);
    transition: color 0.25s ease, transform 0.25s ease;
}

.tool-btn span {
    font-size: 0.92rem;
}

.tool-btn:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.18);
}

.tool-btn:hover i {
    color: var(--accent-color);
    transform: scale(1.08);
}

.tool-btn:active {
    transform: translateY(-1px);
}

.tool-btn:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
}

.tool-btn.running {
    border-color: var(--primary-color);
    background-color: #f0f6ff;
}

@media (max-width: 576px) {
    .tool-btn {
        padding: 0.9rem 0.4rem;
    }

    .tool-btn i {
        font-size: 1.4rem;
    }

    .tool-btn span {
        font-size: 0.85rem;
    }
}