    /* ===== 基础样式 ===== */
    :root {
        --primary-color: #1cc088;
        --primary-hover: #14a77e;
        --card-bg: #fff;
        --text-dark: #2c3e50;
        --text-light: #7f8c8d;
        --border-color: #e0e6ed;
        --light-bg: #f5f7fa;
        --success-bg: #e8f5e9;
        --error-bg: #ffebee;
        --loading-bg: #e3f9f2;
        --warning-bg: #fff9e1;
        --expiring-bg: #FFF8EA;
        --expired-bg: #fff1f1;
        --nav-height: 70px;
    }

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        line-height: 1.6;
        background-color: var(--light-bg);
        color: var(--text-dark);
        background-image: linear-gradient(135deg, #f5f7fa 0%, #e8f9f2 100%);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* ===== 布局样式 ===== */
    .container {
        max-width: 1200px;
        margin: 30px auto;
        padding: 0 20px;
        width: 100% !important;
    }

    .card-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 30px;
    }

    @media (min-width: 992px) {
        .card-grid {
            grid-template-columns: 1fr 1fr;
        }
    }

    /* ===== 导航栏样式 ===== */
    .navbar {
        background-color: var(--card-bg);
        height: var(--nav-height);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .navbar-container {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        height: 100%;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 1.4rem;
        font-weight: 600;
        color: var(--text-dark);
        text-decoration: none;
    }

    .logo img {
        width: 30px;
        height: 30px;
    }

    .hamburger {
        display: none;
        cursor: pointer;
        padding: 10px;
        font-size: 1.5rem;
        color: var(--text-dark);
        background: none;
        border: none;
    }

    .nav-links {
        display: flex;
        gap: 25px;
    }

    .nav-link {
        color: var(--text-light);
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .nav-links .nav-link.active {
        font-weight: bold;
        color: #1CBE86;
    }

    .nav-link:hover {
        color: var(--primary-color);
    }

    .mobile-nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        z-index: 99;
    }

    .mobile-nav-links.active {
        display: flex;
    }

    .mobile-nav-link {
        padding: 15px 20px;
        color: var(--text-light);
        text-decoration: none;
        font-weight: 500;
        transition: background-color 0.3s;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-nav-link:hover {
        background-color: #f7f9fc;
        color: var(--primary-color);
    }

    /* ===== 标题样式 ===== */
    .page-title {
        font-size: 2.2rem;
        margin-bottom: 8px;
        color: var(--text-dark);
        text-align: center;
    }

    .page-subtitle {
        font-size: 1.1rem;
        color: var(--text-light);
        text-align: center;
        margin-bottom: 40px;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    /* ===== 卡片组件样式 ===== */
    .card {
        background-color: var(--card-bg);
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        padding: 25px;
        transition: all 0.3s ease;
        position: relative;
    }

    .card:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }

    .card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .card-icon {
        background-color: rgba(28, 192, 136, 0.15);
        width: 42px;
        height: 42px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        font-size: 18px;
    }

    .card-title {
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--text-dark);
    }

    /* ===== IP显示样式 ===== */
    .ip-container {
       text-align: center;
        padding: 20px;
        background: rgba(28, 192, 136, 0.08);
        border-radius: 12px;
    }

    .ip-display {
        font-size: 1.1rem;
        color: var(--text-dark);
        font-weight: 500;
        word-break: break-all;
    }
    
    /* ===== 域名输入区域样式 ===== */
    .domain-form {
        margin-top: 15px;
    }

    .domain-input-wrapper {
        position: relative;
        margin-bottom: 20px;
    }

    .domain-input {
        width: 100%;
        padding: 18px 0px 18px 45px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        font-size: 1.1rem;
        transition: all 0.3s;
    }

    .domain-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(28, 192, 136, 0.2);
        outline: none;
    }

    .domain-input-icon {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-53%);
        color: var(--primary-color);
        font-size: 1.2rem;
        font-weight: 600;
    }

    .domain-hint {
        color: var(--text-light);
        font-size: 0.95rem;
        margin-top: 10px;
        margin-bottom: 10px;
        padding: 15px;
        background: #f3faf7;
        border-radius: 8px;
        border-left: 4px solid var(--primary-color);
    }

    .domain-trustssl {
        color: var(--text-light);
        font-size: 0.9rem;
        margin-top: 10px;
        margin-bottom: 10px;
        padding: 15px;
        background: #f3faf7;
        border-radius: 8px;
        border-left: 4px solid var(--primary-color);
    }

    .error-message {
        background: var(--error-bg);
        color: #c62828;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* ===== 证书信息展示样式 ===== */
    .cert-info-section {
        margin-top: 25px;
        <?php echo (isset($certData) || !empty($error)) ? 'display: block;' : 'display: none;'; ?>
    }

    .cert-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid var(--border-color);
    }

    .cert-status {
        font-size: 1rem;
        padding: 8px 15px;
        border-radius: 50px;
        font-weight: 600;
    }

    .status-valid {
        background-color: var(--success-bg);
        color: #20b868;
    }

    .status-expiring {
        background-color: var(--expiring-bg);
        color: #FF6600;
    }

    .status-expired {
        background-color: var(--expired-bg);
        color: #c62828;
    }

    .status-invalid {
        background-color: var(--error-bg);
        color: #c62828;
    }
    
    /* ===== 证书卡片样式 ===== */
    .cert-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    @media (max-width: 767px) {
        .cert-grid {
            grid-template-columns: 1fr;
        }
    }
    
    .cert-card {
        background: #fafcfd;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 20px;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .cert-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .cert-card-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .cert-card-icon {
        width: 36px;
        height: 36px;
        background: rgba(28, 192, 136, 0.1);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        font-size: 18px;
    }
    
    .cert-card-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-dark);
    }
    
    .cert-card-status {
        font-size: 1.6rem;
        font-weight: 500;
        text-align: center;
        /* 添加强制换行 */
        word-break: break-word;
    }
    
    .cert-card-content {
        font-size: 1.1rem;
        font-weight: 500;
        color: var(--text-dark);
        /* 添加强制换行 */
        word-break: break-word;
    }

    .cert-expiry {
        display: inline-block;
        padding: 5px 12px;
        border-radius: 30px;
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .days-safe {
        background-color: #e8f5e9;
        color: #20b868;
    }

    .days-warning {
        background-color: #FFF8EA;
        color: #FF6600;
    }

    .days-danger {
        background-color: #ffebee;
        color: #c62828;
    }
    
    .cert-tip {
        margin-top: 20px;
        padding: 12px;
        background: #eef7f4;
        border-radius: 8px;
        border-left: 3px solid var(--primary-color);
        color: #4a8f79;
    }
    
    /* 新添加的证书链项样式 */
    .chain-item {
        padding: 12px 15px;
        margin-bottom: 10px;
        background: #f8f9fd;
        border-radius: 8px;
        border: 1px solid #e0e6ed;
    }
    
    .chain-header {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
    }
    
    .chain-icon {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        font-size: 12px;
    }
    
    .chain-type {
        font-weight: 600;
        margin-right: 6px;
    }
    
    .chain-content {
        padding-left: 34px;
        font-size: 0.9rem;
    }
    
    .chain-property {
        margin-bottom: 5px;
    }
    
    .chain-label {
        display: inline-block;
        min-width: 60px;
        color: var(--text-light);
    }

    /* ===== 证书链滚动容器样式 ===== */
    .chain-container {
        max-height: 400px;
        overflow-y: auto;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 15px;
        margin-top: 15px;
    }
    
    .chain-title {
        font-weight: bold;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .chain-item-primary {
        background-color: rgba(28, 192, 136, 0.1);
        border-left: 3px solid var(--primary-color);
    }

    /* ===== 按钮样式 ===== */
    .query-btn {
        display: block;
        width: 100%;
        padding: 16px;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.3s;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }

    .query-btn:hover {
        background: var(--primary-hover);
        box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    }

    .query-btn:disabled {
        background: #bdc3c7;
        cursor: not-allowed;
        box-shadow: none;
    }

    /* ===== 信息提示样式 ===== */
    .info-tip {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background-color: #F3FAF7;
        padding: 5px 10px;
        border-radius: 5px;
        color: #4a8f79;
        font-size: 0.9rem;
    }

    /* ===== 动画效果 ===== */
    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }

    .loading-pulse {
        animation: pulse 1.5s infinite;
    }

    /* ===== 复制代码功能样式 ===== */
    .copy-btn {
        background: #EEF7F4;
        color: #1cc088;
        border: none;
        padding: 8px 15px;
        border-radius: 8px;
        font-size: 1.0rem;
        cursor: pointer;
        transition: all 0.2s;
        margin-left: auto;
    }

    .copy-btn:hover {
        background: #DAF6EE;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    /* ===== 生成数量统计样式 ===== */
    .counter-pulse {
        font-weight: 700;
        color: #FF7675;
    }

    /* ===== 页脚样式 ===== */
    .footer {
        background-color: var(--card-bg);
        color: white;
        text-align: center;
        padding: 1rem 1rem;
        font-size: 0.95em;
        margin-top: auto;
    }

    .footer p {
        line-height: 1.6;
        color: var(--text-light);
    }

    .footer a {
        text-decoration: none;
        color: var(--text-dark);
    }

    .footer a:hover {
        color: #1cc088;
        text-decoration: none;
    }

    /* ===== 计数器样式 ===== */
    .counter {
        color: var(--primary-color);
        font-weight: 600;
        font-size: 0.9rem;
        background-color: rgba(28, 192, 136, 0.1);
        padding: 8px 16px;
        border-radius: 50px;
        margin-top: 6px;
        margin-bottom: 10px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    /* ===== 加载动画样式 ===== */
    .loading-container {
        display: none;
        text-align: center;
        padding: 40px 0;
    }

    .loading-spinner {
        display: inline-block;
        width: 50px;
        height: 50px;
        border: 5px solid rgba(28, 192, 136, 0.2);
        border-radius: 50%;
        border-top-color: var(--primary-color);
        animation: spin 1s linear infinite;
    }

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

    .loading-text {
        margin-top: 15px;
        font-weight: 500;
        color: var(--text-dark);
    }

    /* ===== 响应式设计 ===== */
    @media (max-width: 991px) {
        .nav-links {
            display: none;
        }
        
        .hamburger {
            display: block;
        }
        
        .card-grid {
            gap: 20px;
        }
    }

    @media (max-width: 767px) {
        .page-title {
            font-size: 1.8rem;
        }
        
        .page-subtitle {
            font-size: 0.95rem;
        }

        .card {
            padding: 20px;
        }
        
        .cert-property {
            flex-direction: column;
        }
        
        .cert-label {
            width: 100%;
            margin-bottom: 5px;
        }
        
        .domain-input {
            padding: 16px 0 16px 45px;
        }
        
        .domain-input-icon {
            transform: translateY(-50%);
        }
    }