/* 全局样式（从原index.php复制） */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
            transition: background 0.3s, color 0.3s;
        }
        /* 暗主题 */
        body.dark-mode {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        }
        body.dark-mode .container {
            background: #222831;
            color: #eee;
        }
        body.dark-mode .header {
            background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
        }
        body.dark-mode .step {
            background: #2d4059;
            border-left-color: #0f3460;
        }
        body.dark-mode .step h2 {
            color: #eee;
        }
        body.dark-mode .form-control {
            background: #393e46;
            border-color: #4ecca3;
            color: #eee;
        }

        body.dark-mode .btn {
            background: linear-gradient(135deg, #4ecca3 0%, #00917c 100%);
        }
        body.dark-mode .btn-secondary {
            background: #5c636a;
        }
        body.dark-mode .alert-info {
            background: #1e3a5f;
            color: #a0d2ff;
            border-color: #2e5a8a;
        }
        body.dark-mode .alert-warning {
            background: #5f4b2e;
            color: #ffd966;
            border-color: #b68b40;
        }
        body.dark-mode .alert-success {
            background: #1e4620;
            color: #a3d9a5;
            border-color: #2e6b31;
        }
        body.dark-mode .alert-danger {
            background: #5f2e2e;
            color: #f5b5b5;
            border-color: #b34b4b;
        }
        body.dark-mode .tab-nav {
            background: #222831;
            border-bottom-color: #444;
        }
        body.dark-mode .tab-item {
            color: #aaa;
        }
        body.dark-mode .tab-item:hover {
            color: #fff;
            border-bottom-color: #4ecca3;
        }
        body.dark-mode .tab-item.active {
            color: #4ecca3;
            border-bottom-color: #4ecca3;
        }
        body.dark-mode .transaction-details {
            background: #2d4059;
        }
        body.dark-mode .nameservers-list {
            background: #2d4059;
            color: #eee;
        }
        .nameservers-list h3 {
            margin-top: 10px;
            margin-bottom: 20px;  /* 可根据需要调整数值 */
        }

        .nameservers-list p {
            margin-top: 0;        /* 可选：重置上方外边距 */
            margin-bottom: 20px;  /* 如果需要下方也有间距可设置 */
        }
        body.dark-mode .nameservers-list .form-control {
            background: #393e46;
            border-color: #4ecca3;
            color: #eee;
        }

        body.dark-mode .nameservers-list .btn-danger {
            background-color: #dc3545;
            border-color: #dc3545;
            color: #fff;
        }
        body.dark-mode .nameservers-list .btn-danger:hover {
            background-color: #c82333;
        }

        body.dark-mode .nameservers-list .btn-success {
            background-color: #28a745;
            border-color: #28a745;
        }
        body.dark-mode .nameservers-list .btn-success:hover {
            background-color: #218838;
        }

        body.dark-mode .nameservers-list .btn-secondary {
            background-color: #6c757d;
            border-color: #6c757d;
        }
        body.dark-mode .nameservers-list .btn-secondary:hover {
            background-color: #5a6268;
        }

        body.dark-mode .nameservers-list .btn-primary {
            background: linear-gradient(135deg, #4ecca3 0%, #00917c 100%);
            border: none;
        }
        body.dark-mode .nameservers-list .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(78, 204, 163, 0.3);
        }
        body.dark-mode .supported-domains-box {
            background: #2d4059;
            border-color: #4ecca3;
        }
        body.dark-mode .domain-suffix {
            background: #393e46;
            color: #eee;
        }
        body.dark-mode .domain-suffix:hover {
            background: #4ecca3;
            color: #222;
        }

        .container {
            max-width: 80%;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
            transition: background 0.3s;
        }
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 40px 30px;
            text-align: center;
            transition: background 0.3s;
        }
        .header h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
        }
        .header p {
            opacity: 0.9;
            font-size: 1.1rem;
        }
        /* 导航栏容器，使用flex布局 */
        .nav-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: white;
            border-bottom: 1px solid #dee2e6;
        }
    	body.dark-mode .nav-bar {
        		background: #1e1e2f;      /* 深色背景，可根据需要调整 */
       		border-bottom-color: #444; /* 深色边框 */
    	}
        .tab-nav {
            display: flex;
            flex-wrap: wrap;
        }
        .tab-item {
            padding: 15px 25px;
            margin-right: 5px;
            cursor: pointer;
            color: #6c757d;
            font-weight: 500;
            border-bottom: 3px solid transparent;
            transition: all 0.2s;
        }
        .tab-item:hover {
            color: #495057;
            border-bottom-color: #dee2e6;
        }
        .tab-item.active {
            color: #667eea;
            border-bottom-color: #667eea;
            font-weight: 600;
        }
        .tab-item a {
            text-decoration: none;
            color: inherit;
            display: block;
        }
        /* 主题切换按钮 */
        .theme-toggle {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 10px;
            border-radius: 50%;
            width: 45px;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s;
            color: #667eea;
        }
        .theme-toggle:hover {
            background: rgba(102, 126, 234, 0.1);
        }
        body.dark-mode .theme-toggle {
            color: #4ecca3;
        }
        body.dark-mode .theme-toggle:hover {
            background: rgba(78, 204, 163, 0.2);
        }

        .ns-action-bar {
        margin-top: 10px;
        }

        .ns-save-bar {
            margin-top: 20px;
        }

        .content {
            padding: 40px;
            transition: background 0.3s;
        }
        .step {
            text-align:left;
            margin-bottom: 40px;
            padding: 25px;
            background: #f8f9fa;
            border-radius: 15px;
            border-left: 5px solid #667eea;
            transition: background 0.3s;
        }
        .step_reg {
            text-align:left;
            margin-bottom: 10px;
            padding: 25px;

            border-radius: 15px;
           
            transition: background 0.3s;
        }
        .step h2 {
            color: #333;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.4rem;
        }
        .step-number {
            background: #667eea;
            color: white;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }
        .form-group {
            display:flex;
            align-items:center;
            gap:10px;
            margin-bottom: 20px;
        }
        .form-group label {
            float:left;
            display: block;
            margin-bottom: 8px;
            margin-right: 10px;
            color: #aaa;
            font-weight: 500;
        }
        .form-control {
            width: 70%;
            padding: 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 16px;
            transition: border-color 0.3s, background 0.3s;
        }
        .form-control:focus {
            outline: none;
            border-color: #667eea;
        }
        .form-control-phonenumber {
            max-width: 100px;
        }
        .btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 14px 30px;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
        }
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
        }
        .btn-secondary {
            background: #6c757d;
        }
        .btn {
            padding: 10px 20px;
            border: none;
            background: #007bff;
            color: #fff;
            cursor: pointer;
            transition: 0.3s;
        }

        .btn:hover {
            background: #0056b3;
        }

        .btn:disabled {
            background: #ccc;
            cursor: not-allowed;
            opacity: 0.6;
        }

        .availability-result {
            padding: 15px;
            border-radius: 10px;
            margin: 20px 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .available {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        .unavailable {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        .status {
            font-weight: bold;
            font-size: 1.1rem;
        }
        .price {
            font-size: 1.2rem;
            font-weight: bold;
            color: #28a745;
        }
        .alert {
            padding: 15px;
            border-radius: 10px;
            margin: 20px 0;
        }
        .alert-success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        .alert-danger {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        .form-actions {
            display: flex;
            gap: 10px;
            margin-top: 40px;
            margin-left: 50%;
        }
        .record-type-selector {
            display: flex;
            gap: 20px;
            margin: 20px 0;
        }
        .record-type {
            flex: 1;
            text-align: center;
        }
        .record-type input[type="radio"] {
            display: none;
        }
        .record-type label {
            display: block;
            padding: 20px;
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
        }
        .record-type input[type="radio"]:checked + label {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.1);
        }
        .record-type .icon {
            font-size: 2rem;
            margin-bottom: 10px;
            color: #667eea;
        }
        .record-type .type-name {
            font-weight: bold;
            font-size: 1.1rem;
            color: #333;
        }
        .record-type .type-desc {
            font-size: 0.9rem;
            color: #666;
            margin-top: 5px;
        }
        .help-text {
            font-size: 0.9rem;
            color: #666;
            margin-top: 5px;
        }
        .transaction-details {
            background: #e9ecef;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        .contact-form {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-top: 20px;
        }
        .contact-form .full-width {
            grid-column: 1 / -1;
        }

    /* 隐私声明区域 */
    .privacy-note {
        margin-top: 40px;
        padding: 15px;
        background: #e9ecef;
        border-radius: 8px;
        transition: background 0.3s, color 0.3s;
    }

    .privacy-text {
        margin-bottom: 0;
        font-size: 0.9rem;
    }

    /* 暗主题下的隐私声明 */
    body.dark-mode .privacy-note {
        background: #2d4059;
        color: #eee;
    }

    .site-footer {
        text-align: center;
        padding: 20px;
        background: #6e77c7;
        margin-top: 40px;
        transition: background 0.3s;
    }

	/* 暗主题下的底部样式 */
	body.dark-mode .site-footer {
    		background: #2d4059;   /* 深色背景 */
    		color: #eee;
	}

    /* 折叠面板暗主题 */
    body.dark-mode .collapse-panel {
        border-color: #444;
    }

    body.dark-mode .collapse-header {
        background-color: #2d4059;
        color: #eee;
        border-bottom-color: #444;
    }

    body.dark-mode .collapse-header:hover {
        background-color: #1e2a3a;
    }

    body.dark-mode .collapse-content {
        background: #222831;
        border-top-color: #444;
    }

    body.dark-mode .collapse-content .form-control {
        background: #393e46;
        border-color: #4ecca3;
        color: #eee;
    }

    body.dark-mode .collapse-content label {
        color: #ccc;
    }

    /* 如果希望箭头也变色 */
    body.dark-mode .collapse-header .arrow {
        color: #4ecca3;
    }

    /* 域名表格样式 */
    .domain-table {
        width: 100%;
        border-collapse: collapse;
    }

    .table-header {
        background: #f2f2f2;
    }

    .table-header th {
        padding: 10px;
        text-align: left;
    }

    .domain-cell {
        padding: 10px;
        border-bottom: 1px solid #ddd;
    }


    /* 暗主题下的表格样式 */
    body.dark-mode .table-header {
        background: #2d4059;
        color: #eee;
    }

    body.dark-mode .domain-cell {
        border-bottom-color: #444;
        color: #ddd;
    }

    body.dark-mode .domain-cell a {
        color: #4ecca3; /* 链接颜色 */
    }

    /* 域名列表中的链接 */
    body.dark-mode #domain-list-body a {
        color: #4ecca3;  /* 亮绿色，与暗主题协调 */
    }

    body.dark-mode #domain-list-body a:hover {
        color: #7ae9c5;  /* 悬停时稍亮的绿色 */
    }
    /* 全局移除所有链接的下划线 */
    a {
        text-decoration: none;
    }

    /* 或只针对域名列表中的链接移除下划线 */
    #domain-list-body a {
        text-decoration: none;
    }

    /* DNS 记录表格暗主题 */
    body.dark-mode .table {
        background-color: #222831;
        border-color: #444;
    }

    body.dark-mode #dns-records-tbody .view-mode {
        background-color: #222831;
        color: #eee;
        border-color: #444 !important; /* 覆盖可能的内联边框 */
    }

    body.dark-mode #dns-records-tbody .form-control {
        background-color: #393e46;
        border-color: #4ecca3;
        color: #eee;
    }

    /* 按钮暗主题 */
    body.dark-mode .btn-primary {
        background-color: #4ecca3;
        border-color: #4ecca3;
        color: #222;
    }
    body.dark-mode .btn-primary:hover {
        background-color: #45b893;
        border-color: #45b893;
    }

    body.dark-mode .btn-danger {
        background-color: #dc3545;
        border-color: #dc3545;
        color: #fff;
    }
    body.dark-mode .btn-danger:hover {
        background-color: #c82333;
        border-color: #bd2130;
    }

    body.dark-mode .btn-success {
        background-color: #28a745;
        border-color: #28a745;
        color: #fff;
    }
    body.dark-mode .btn-success:hover {
        background-color: #218838;
        border-color: #1e7e34;
    }

    body.dark-mode .btn-secondary {
        background-color: #6c757d;
        border-color: #6c757d;
        color: #fff;
/*        max-width: 20%;*/
    }

    body.dark-mode .btn-secondary .exit {
        background-color: #6c757d;
        border-color: #6c757d;
        color: #fff;
    }
    body.dark-mode .btn-secondary:hover {
        background-color: #5a6268;
        border-color: #545b62;
    }

    /* 新增行模板暗主题 */
    body.dark-mode #new-record-row td {
        background-color: #222831;
        color: #eee;
    }
    body.dark-mode #new-record-row .form-control {
        background-color: #393e46;
        border-color: #4ecca3;
        color: #eee;
    }
    body.dark-mode table thead th {
        background-color: #2d4059;
        color: #eee;
        border-color: #444;
    }
    /* 展开手柄暗主题 */
    body.dark-mode .expand-handle {
        color: #4ecca3;  /* 亮绿色，与暗主题协调 */
    }

    body.dark-mode .expand-handle:hover {
        color: #7ae9c5;  /* 悬停时稍亮的绿色 */
        text-decoration: underline;
    }
    /* 退出链接包装器 */
    .logout-link-wrapper {
        margin-top: 20px;
        text-align: center;
    }

    /* 退出链接亮主题样式 */
    .logout-link {
        text-decoration: none;
        color: #007bff;  /* 亮主题下的颜色，可自定义 */
    }

    .logout-link:hover {
        color: #0056b3;
    }

    /* 暗主题下的退出链接样式 */
    body.dark-mode .logout-link {
        color: #4ecca3;  /* 与暗主题其他链接一致 */
    }

    body.dark-mode .logout-link:hover {
        color: #7ae9c5;
    }
    
    body.dark-mode .ns-action-bar {
        margin-top: 10px;
    }

    body.dark-mode .ns-save-bar {
        margin-top: 20px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }

    /* 确保 nameserver-item 允许换行 */
    .nameserver-item {
        width: 70%;
        display: flex;
        gap: 10px;
        margin-bottom: 10px;
        flex-wrap: wrap;  /* 关键：允许换行 */
        align-items: center;
    }

    /* 输入框尽可能占用剩余宽度，但保留最小宽度 */
    .nameserver-item .nameserver-input {
        flex: 1 1 200px;     /* 可以增长和收缩，基础宽度200px */
        min-width: 150px;    /* 防止过窄，保留可读性 */
    }

    .tab-btn{
            flex: 1;                  /* 让按钮等宽，如果不想要等宽可改为 flex: 0 1 auto */
            padding: 12px 30px;       /* 上下12px，左右30px，使按钮宽大 */
            border: none;
            border-radius:10px 10px 0 0;
/*            background: transparent;*/
            color: #666;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
    }
    .tab-btn active{
        background: #667eea; 
    }

    .tab-btn:hover {
        background: #667eea;       /* 激活状态背景色 */
        color: white;
        font-weight: 600;
        box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3); /* 可选阴影 */
    }

    /* 窄屏幕下（例如小于600px）可以调整基础宽度，让换行更合理 */
    @media (max-width: 600px) {
            .nameserver-item .nameserver-input {
                flex-basis: 100%;  /* 基础宽度改为100%，强制换行 */
            }
            .nameserver-item .btn {
                flex: 0 0 auto;    /* 按钮保持自动宽度，不增长 */
                margin-left: 0;
            }
        .nav-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: white;
            padding: 0 20px;
            border-bottom: 1px solid #dee2e6;
            flex-wrap: wrap;
            gap: 10px;
        }


        /* 登录/注册选项卡 */
        .auth-tabs {
            display: flex;
            gap: 10px;                /* 按钮之间的间距 */
            margin-bottom: 20px;
            background: #f5f7fa;      /* 可选：整个选项卡区域背景 */
            padding: 8px;             /* 可选：内部留白 */
            border-radius: 40px;      /* 如果想让整个容器也圆润 */
            width: fit-content;       /* 宽度根据内容自适应 */
        }

        .tab-btn{
            flex: 1;                  /* 让按钮等宽，如果不想要等宽可改为 flex: 0 1 auto */
            padding: 12px 30px;       /* 上下12px，左右30px，使按钮宽大 */
            border: none;
            border-radius:10px 10px 0 0;
            background: transparent;
            color: #666;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
        }
        .tab-btn:hover {
            background: #667eea;       /* 激活状态背景色 */
            color: white;
            font-weight: 600;
            box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3); /* 可选阴影 */
        }

        .tab-btn.active {
            border-bottom-color: #667eea;
            color: #333;
        }

        .tab-btn:not(.active) {
            color: #6c757d;
        }
    }

    /* 平板及以下 (max-width: 992px) */
    @media (max-width: 992px) {
        .container {
            max-width: 90%;  /* 容器宽度稍大，但仍留边距 */
        }
        .header h1 {
            font-size: 2rem;
        }
        .tab-item {
            padding: 12px 18px;  /* 稍微缩小内边距 */
        }
    }

    /* 手机 (max-width: 768px) */
    @media (max-width: 768px) {
        .container {
            max-width: 100%;
            margin: 0 10px;
            border-radius: 15px;
        }
        .header {
            padding: 25px 15px;
        }
        .header h1 {
            font-size: 1.8rem;
            gap: 8px;
        }
        .header p {
            font-size: 1rem;
        }
        .content {
            padding: 15px;
        }
        .step {
            padding: 15px;
        }
        .step h2 {
            font-size: 1.2rem;
        }
        .form-group label {
            font-size: 0.95rem;
        }
        .form-control {
            padding: 10px 12px;
            font-size: 15px;
        }
        .btn {
            padding: 12px 20px;
            font-size: 15px;
        }
        .tab-nav {
            flex-wrap: wrap;
            justify-content: center;
        }
        .tab-item {
            padding: 10px 12px;
            font-size: 0.9rem;
        }
        .nav-bar {
            flex-wrap: wrap;
            gap: 10px;
        }
        .theme-toggle {
            width: 40px;
            height: 40px;
            font-size: 1.3rem;
        }

        /* 联系人表单改为单列 */
        .contact-form {
            grid-template-columns: 1fr;
        }

        /* 域名表格允许横向滚动 */
        .domain-table-wrapper {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        .domain-table {
            min-width: 600px;  /* 保证表格不压缩，允许横向滚动 */
        }

        /* DNS 记录表格区域 */
        .step .table {
            font-size: 0.9rem;
        }
        .step .table th,
        .step .table td {
            padding: 6px;
        }
        .btn-sm {
            padding: 5px 8px;
            font-size: 0.8rem;
        }

        .nameserver-item .btn {
            align-self: flex-start;
        }
        .nameserver-item .form-control {
            width: calc(100% - 50px);  /* 留出删除按钮位置 */
        }

         #dns-records-tbody .btn-sm {
            display: block;
            width: 100%;
            margin-bottom: 5px;
        }
        #dns-records-tbody td:last-child {
            white-space: normal;  /* 允许按钮换行 */
        }

        /* 支持的后缀折叠框 */
        .supported-domains-content {
            max-height: 4.5em;  /* 手机屏小，适当调整 */
        }
        .domain-suffix {
            padding: 2px 4px;
            font-size: 0.85rem;
        }

        /* 交易详情、提示等 */
        .transaction-details,
        .alert {
            padding: 12px;
            font-size: 0.9rem;
        }


        /* 所有按钮在窄屏幕下宽度 100% */
        .step .btn {
            width: 100%;
        }
    }

    /* 小手机 (max-width: 480px) */
    @media (max-width: 480px) {
        .header h1 {
            font-size: 1.5rem;
        }
        .header p {
            font-size: 0.9rem;
        }
        .tab-item {
            padding: 8px 10px;
            font-size: 0.85rem;
        }
        .step-number {
            width: 25px;
            height: 25px;
            font-size: 0.9rem;
        }
        .btn {
            width: 100%;  /* 按钮全宽，方便点击 */
        }
        .form-actions {
            flex-direction: column;
            gap: 8px;
        }
        .logout-link-wrapper {
            text-align: center;
        }
        .auth-tabs {
            flex-direction: column;
            border-bottom: none;
        }
        .tab-btn {
            width: 100%;
            border-bottom: 1px solid #dee2e6;
        }
        .tab-btn.active {
            border-bottom: 3px solid #667eea;
        }
    }

    /* 域名登录框 */
        .domain-login-box {
            border: 1px solid #ddd;
            padding: 20px;
            margin-bottom: 30px;
            border-radius: 5px;
            background: #f9f9f9;
            max-width: 500px;
            margin-left: auto;
            margin-right: auto;
        }

        .domain-login-box h3 {
            margin-top: 0;
            margin-bottom: 15px;
            color: #333;
        }

        .domain-login-box p {
            margin-bottom: 20px;
            color: #666;
        }

        .login-error {
            color: #dc3545;
            margin-bottom: 15px;
            padding: 8px;
            background: #f8d7da;
            border-radius: 4px;
            border: 1px solid #f5c6cb;
        }

        .domain-login-form .form-group {
            margin-bottom: 15px;
        }

        .domain-login-form label {
            display: block;
            width: 100px;
            margin-bottom: 5px;
            font-weight: 500;
            color: #555;
        }

        .domain-login-form input[type="text"],
        .domain-login-form input[type="password"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 16px;
            box-sizing: border-box;
        }

        .domain-login-form input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 2px rgba(102,126,234,0.2);
        }

        .captcha-group {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0;
        }

        .captcha-group label {
            flex: 0 0 auto;
            margin-bottom: 0;
            margin-right: 10px;
        }

        .captcha-text {
            font-weight: bold;
            background: #e9ecef;
            padding: 8px 15px;
            border-radius: 4px;
            font-size: 1.2rem;
            letter-spacing: 2px;
            flex: 0 0 auto;
        }

        .captcha-group input {
            flex: 1 1 150px;
            min-width: 100px;
        }

        .btn-block {
            width: 100%;
            padding: 12px;
            font-size: 16px;
        }

        /* 暗主题适配（如果已启用） */
        body.dark-mode .domain-login-box {
            background: #2d4059;
            border-color: #444;
        }

        body.dark-mode .domain-login-box h3,
        body.dark-mode .domain-login-box p {
            color: #eee;
        }

        body.dark-mode .domain-login-form label {
            color: #ccc;
        }

        body.dark-mode .domain-login-form input {
            background: #393e46;
            border-color: #4ecca3;
            color: #eee;
        }

        body.dark-mode .captcha-text {
            background: #222831;
            color: #4ecca3;
        }

        /* 窄屏幕适配 */
        @media (max-width: 768px) {
            .domain-login-box {
                padding: 15px;
            }

            .captcha-group {
                flex-direction: column;
                align-items: stretch;
            }

            .captcha-group label {
                margin-bottom: 5px;
            }

            .captcha-text {
                text-align: center;
                margin-bottom: 5px;
            }

            .captcha-group input {
                width: 100%;
            }

            .btn-block {
                padding: 12px;
                font-size: 16px;
            }
        }

        @media (max-width: 480px) {
            .domain-login-box {
                padding: 10px;
            }

            .domain-login-form input {
                font-size: 14px;
            }

            .btn-block {
                font-size: 14px;
                padding: 10px;
            }
        }
    .login-mode-wrapper {
        display: flex;
        justify-content: center;   /* 水平居中 */
        align-items: center;       /* 垂直居中 */
        gap: 10px;
        margin-bottom: 20px;
    }

    .mode-btn {
        flex: 1;
        max-width: 200px;          /* 控制按钮最大宽度 */
    }

    .login-form {
        padding-left:20%;
    }
    .text-muted {
        color: #aaa !important;
    }

    /* 步骤容器通用间距 */
    .transfer-step {
        margin-top: 20px;
    }

    /* 解锁开关行布局 */
    .transfer-lock-row {
        display: flex;
        align-items: center;
        gap: 15px;
        flex-wrap: wrap;
    }

    /* 开关样式（原内联样式移出） */
    .switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 24px;
    }
    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }
    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: .4s;
        border-radius: 24px;
    }
    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }
    input:checked + .slider {
        background-color: #28a745;
    }
    input:checked + .slider:before {
        transform: translateX(26px);
    }

    /* 锁定状态文本 */
    .lock-status {
        font-size: 0.95rem;
    }

    /* 授权码行布局 */
    .transfer-auth-row {
        display: flex;
        gap: 10px;
        margin-top: 8px;
        flex-wrap: wrap;
    }

    /* 授权码输入框宽度 */
    .transfer-auth-input {
       flex: 1 1 200px;     /* 可增长、可收缩，基础宽度200px */
       min-width: 150px;    /* 设置一个更小的最小宽度，防止过窄 */
       width: auto;         /* 覆盖原有固定宽度 */
    }

    /* 授权码消息区域 */
    .auth-code-message {
        margin-top: 8px;
        font-size: 0.9rem;
    }

    /* 转移状态显示框 */
    .transfer-status-box {
        margin-top: 8px;
        padding: 10px;
        background: #393e46;
        color:#877c7c;
        border-radius: 4px;
    }

    /* 按钮上边距 */
    .btn-spacing {
        margin-top: 8px;
    }

/* ========== 新增/重写注册表单布局 —— 实现 user 表排列效果 ========== */
#register-panel .contact-form {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;  /* 第一列标签，第二、三列控件 */
    gap: 40px 26px;                         /* 行间距20px，列间距16px */
    align-items: start;                      /* 顶部对齐 */
}

#register-panel .form-group {
    display: contents; /* 让每个 .form-group 内的子项直接参与父网格布局 */
}

/* 标签样式：统一放在第一列，右对齐 */
#register-panel .form-group > label {
    grid-column: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1f2a41;
    padding-top: 14px;          /* 与输入框文字垂直对齐 */
    text-align: right;
    padding-right: 12px;
    line-height: 1.4;
    word-break: break-word;
    align-self: center;          /* 垂直居中 */
}

/* 第一列控件 */
#register-panel .col-first {
    grid-column: 2;
}

/* 第二列控件 */
#register-panel .col-second {
    grid-column: 3;
}

/* 跨两列的控件（如地址、国家、邮政编码） */
#register-panel .col-span {
    grid-column: 2 / span 2;
}

/* 输入框统一高度与边框 */
#register-panel .form-control,
#register-panel select.form-control,
#register-panel input.form-control {
    width: 60%;
    padding: 10px 14px;
    border: 1.5px solid #dfe6f0;
    border-radius: 14px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.15s;
    outline: none;
    height: 48px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

#register-panel .form-control:focus,
#register-panel select.form-control:focus,
#register-panel input.form-control:focus {
    border-color: #2b6ef0;
    box-shadow: 0 0 0 3px rgba(43,110,240,0.15);
}

/* 下拉箭头保留 */
#register-panel select.form-control {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%233b4a62" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 38px;
}

/* 验证码 + 按钮组合（放在第二列） */
#register-panel .flex-row {
    display: flex;
    gap: 10px;
    align-items: left;
    width: 75%;
}

#register-panel .flex-row .form-control {
    flex: 1;
    min-width: 0;
}

/* 按钮样式（沿用原按钮，只微调高度） */
#register-panel .btn-secondary {
    height: 48px;
    padding: 0 20px;
    white-space: nowrap;
    border-radius: 30px;
}

/* 暗主题适配 */
body.dark-mode #register-panel .form-group > label {
    color: #ccc;
}
body.dark-mode #register-panel .form-control,
body.dark-mode #register-panel select.form-control,
body.dark-mode #register-panel input.form-control {
    background: #393e46;
    border-color: #4ecca3;
    color: #eee;
    padding-left:10px;
}
body.dark-mode #register-panel .form-control:focus,
body.dark-mode #register-panel select.form-control:focus,
body.dark-mode #register-panel input.form-control:focus {
    border-color: #4ecca3;
    box-shadow: 0 0 0 3px rgba(78,204,163,0.25);
}
body.dark-mode #register-panel .btn-secondary {
    background: #5c636a;
    color: white;
    border: 1px solid #4ecca3;
}
body.dark-mode #register-panel .btn-secondary:hover {
    background: #4ecca3;
    color: #222;
}

/* 响应式：小屏幕转单列 */
@media (max-width: 700px) {
    #register-panel .contact-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    #register-panel .form-group > label {
        text-align: left;
        padding-right: 0;
        grid-column: 1;
        padding-top: 0;
        margin-bottom: 4px;
    }
    #register-panel .col-first,
    #register-panel .col-second,
    #register-panel .col-span {
        grid-column: 1;
    }
    #register-panel .flex-row {
        flex-wrap: wrap;
    }
    #register-panel .flex-row .btn-secondary {
        width: 100%;
    }
}

/* 所有 select 宽度自适应内容，并设置最小宽度保证可读性 */
#register-panel select.form-control,
#register-panel .form-control select {
    width: auto !important;     /* 取消固定宽度，由内容决定 */
    min-width: 100px;           /* 避免过窄，可根据实际选项调整 */
    max-width: 100%;            /* 防止溢出父容器 */
    flex-shrink: 0;             /* 在 flex 容器中禁止缩小（可选） */
}

/* 手机号行中的 select 位于 flex 容器，不需要 justify-self */
#phone-group .flex-row select {
    width: auto !important;
    flex: 0 1 auto !important;       /* 确保不拉伸、可收缩 */
    min-width: 100px;
}

/* 让普通输入框（文本、邮箱、密码等）占满网格列，保持布局整齐 */
#register-panel input.form-control:not([type=hidden]) {
    width: 70%;
}

/* ---------- 字段宽度精细化控制 ---------- */
/* 手机号输入框：宽度适应 20 位数字，设置合适宽度（可根据设计调整） */
#register-panel #phone_number {
    width: 220px;          /* 桌面端固定宽度，约可容纳 20 位数字 */
    max-width: 100%;       /* 小屏幕时允许收缩 */
}

/* 邮政编码输入框：宽度适应 10 位数字 */
#register-panel #postcode {
    width: 150px;
    max-width: 100%;
}

/* 国家下拉框：自适应内容，但限制最大宽度避免过长国家名撑开布局 */
#register-panel #reg_country {
    width: auto;           /* 由内容决定 */
    max-width: 300px;      /* 最长国家名（如“United States”）宽度约 260px，300px 留有空间 */
}

/* 可选：如果邮箱/密码等也想稍窄，可类似调整，此处仅举例 */
#email,
#password,
#confirm_password {
    width: 280px;          /* 邮箱和密码可稍宽，但也可视情况调整 */
    max-width: 100%;
}


/* ========== home.php 专用样式（重构版，基于继承，亮暗主题分明） ========== */
.home-container {
    background-color: #f8fafd;
    color: #1e293b;  /* 亮主题基础文字色（深灰） */
    padding: 2rem 1.5rem;
    border-radius: 24px 24px 0 0;
    transition: background-color 0.3s, color 0.2s;
}

body.dark-mode .home-container {
    background-color: #0f1117;
    color: #e9edf2;  /* 暗主题基础文字色（浅灰） */
}

/* 所有卡片容器继承基础文字颜色 */
.home-container .step,
.home-container .category-card,
.home-container .transfer-preview,
.home-container .cta-box {
    background-color: #ffffff;
    color: inherit;  /* 继承 .home-container 的颜色 */
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

body.dark-mode .home-container .step,
body.dark-mode .home-container .category-card,
body.dark-mode .home-container .transfer-preview,
body.dark-mode .home-container .cta-box {
    background-color: #1e2028;
    border-color: #2d313c;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* 主视觉特殊渐变背景（不影响文字颜色） */
.home-container .hero-step {
    background: linear-gradient(135deg, #ffffff 0%, rgba(102, 126, 234, 0.05) 100%);
    border-left: 4px solid #667eea;
}
body.dark-mode .home-container .hero-step {
    background: linear-gradient(135deg, #1e2028 0%, rgba(102, 126, 234, 0.15) 100%);
    border-left-color: #4ecca3;
}

/* 标题、段落等基础文字直接继承父级颜色，无需重复定义 */
.home-container h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    background: linear-gradient(to right, #1e293b, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}
body.dark-mode .home-container h1 {
    background: linear-gradient(to right, #e9edf2, #4ecca3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-container .hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: #475569;  /* 保留特殊色，不继承 */
    margin-bottom: 1.5rem;
}
body.dark-mode .home-container .hero-subtitle {
    color: #a0a8b8;
}

/* 小标签（tagline）特殊色 */
.home-container .tagline {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.35rem 1.2rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin-bottom: 1.5rem;
}
body.dark-mode .home-container .tagline {
    background: rgba(78, 204, 163, 0.15);
    color: #4ecca3;
    border-color: rgba(78, 204, 163, 0.3);
}

/* 域名网格布局 */
.home-container .domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* 卡片标题 */
.home-container .category-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;  /* 继承父级基础色 */
}
.home-container .category-title span {
    background-color: #667eea;
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
}
body.dark-mode .home-container .category-title span {
    background-color: #4ecca3;
    color: #222831;
}

/* 后缀徽章 */
.home-container .suffix-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.7rem;
    margin: 1rem 0 1.2rem;
}
.home-container .suffix-badge {
    background-color: #f1f4f9;
    color: inherit;  /* 继承基础色 */
    padding: 0.3rem 0.9rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}
body.dark-mode .home-container .suffix-badge {
    background-color: #2a2e3a;
    border-color: #2d313c;
}
.home-container .suffix-badge:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}
body.dark-mode .home-container .suffix-badge:hover {
    background-color: #4ecca3;
    color: #222831;
    border-color: #4ecca3;
}

/* 特性标签区域 */
.home-container .feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin-top: 0.8rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #475569;  /* 特殊次级文字色 */
}
body.dark-mode .home-container .feature-tags {
    border-top-color: #2d313c;
    color: #a0a8b8;
}
.home-container .feature-tags i {
    color: #667eea;
    font-style: normal;
    margin-right: 0.2rem;
}
body.dark-mode .home-container .feature-tags i {
    color: #4ecca3;
}
.home-container .feature-tags span {
    background-color: rgba(102, 126, 234, 0.08);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
}
body.dark-mode .home-container .feature-tags span {
    background-color: rgba(78, 204, 163, 0.15);
}

/* 行动呼唤区域 */
.home-container .cta-box {
    background: rgba(102, 126, 234, 0.08);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
}
body.dark-mode .home-container .cta-box {
    background: rgba(78, 204, 163, 0.1);
}
.home-container .cta-box h3 {
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
    color: inherit;
}
.home-container .cta-box p {
    color: #475569;  /* 次级文字 */
}
body.dark-mode .home-container .cta-box p {
    color: #a0a8b8;
}

/* 转入预览区域 */
.home-container .transfer-preview {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}
.home-container .transfer-preview .step-indicator {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.home-container .transfer-preview .step-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #475569;  /* 次级文字 */
}
body.dark-mode .home-container .transfer-preview .step-item {
    color: #a0a8b8;
}
.home-container .transfer-preview .step-item.active {
    color: #667eea;
    font-weight: 500;
}
body.dark-mode .home-container .transfer-preview .step-item.active {
    color: #4ecca3;
}
.home-container .transfer-preview .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(102, 126, 234, 0.15);
    color: #667eea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
body.dark-mode .home-container .transfer-preview .step-number {
    background-color: rgba(78, 204, 163, 0.2);
    color: #4ecca3;
}

/* 按钮样式（保持原有点击区域） */
.home-container .btn-primary {
    background: linear-gradient(135deg, #667eea, #818cf8);
    border: none;
    color: white;
    padding: 0.8rem 2.5rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
}
body.dark-mode .home-container .btn-primary {
    background: linear-gradient(135deg, #4ecca3, #45b893);
    box-shadow: 0 4px 10px rgba(78, 204, 163, 0.3);
}
.home-container .btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.4);
}
body.dark-mode .home-container .btn-primary:hover {
    box-shadow: 0 8px 18px rgba(78, 204, 163, 0.4);
}

/* 分割线 */
.home-container hr {
    border-color: #e2e8f0;
    margin: 2rem 0;
}
body.dark-mode .home-container hr {
    border-color: #2d313c;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .home-container h1 {
        font-size: 2rem;
    }
    .home-container .domain-grid {
        grid-template-columns: 1fr;
    }
    .home-container .hero-step {
        padding: 1.5rem;
    }
}
@media (max-width: 768px) {
    .home-container .transfer-preview .step-indicator {
        gap: 1rem;
    }
    .home-container .cta-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ========== home.php 补充样式（内联样式转类） ========== */

/* 主视觉描述文本 */
.home-container .hero-description {
    font-size: 1.1rem;
    max-width: 600px;
    color: #475569;  /* 亮色次级文字 */
    margin-bottom: 2rem;
}
body.dark-mode .home-container .hero-description {
    color: #a0a8b8;
}

/* 搜索框容器 */
.home-container .search-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 500px;
    background-color: #ffffff;
    padding: 5px;
    border-radius: 60px;
    border: 1px solid #e2e8f0;
}
body.dark-mode .home-container .search-box {
    background-color: #1e2028;
    border-color: #2d313c;
}

/* 搜索输入框 */
.home-container .search-input {
    flex: 1;
    min-width: 200px;
    border: none;
    background: transparent;
    padding: 0 20px;
    color: inherit;  /* 继承父级文字色 */
    outline: none;
}

/* 卡片内的描述文字 */
.home-container .card-description {
    margin-top: 0.8rem;
    color: #475569;
    font-size: 0.95rem;
}
body.dark-mode .home-container .card-description {
    color: #a0a8b8;
}

/* CTA 区域标题 */
.home-container .cta-title {
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
    color: inherit;
}

/* CTA 区域次级文字 */
.home-container .cta-text {
    color: #475569;
    margin: 0;
}
body.dark-mode .home-container .cta-text {
    color: #a0a8b8;
}

/* 转入指引小标题 */
.home-container .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 转入指引徽章 */
.home-container .section-badge {
    background-color: #667eea;
    color: white;
    padding: 0.2rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
}
body.dark-mode .home-container .section-badge {
    background-color: #4ecca3;
    color: #222831;
}

/* 转入指引次级说明 */
.home-container .section-subtitle {
    color: #475569;
    max-width: 700px;
}
body.dark-mode .home-container .section-subtitle {
    color: #a0a8b8;
}

/* 转入预览区域内的自动边距 */
.home-container .transfer-preview .ml-auto {
    margin-left: auto;
}

/* 转入条件列表项 */
.home-container .condition-item {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: #475569;
    margin-top: 1.8rem;
}
body.dark-mode .home-container .condition-item {
    color: #a0a8b8;
}

/* 授权码输入区域 */
.home-container .auth-box {
    margin-top: 2rem;
    background-color: #f1f4f9;
    padding: 1.2rem;
    border-radius: 16px;
}
body.dark-mode .home-container .auth-box {
    background-color: #2a2e3a;
}

/* 授权码输入行 */
.home-container .auth-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* 底部信息区 */
.home-container .footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0 0.5rem;
    color: #475569;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}
body.dark-mode .home-container .footer-info {
    color: #a0a8b8;
    border-top-color: #2d313c;
}

/* 底部功能列表 */
.home-container .footer-features {
    display: flex;
    gap: 2rem;
}

/* 特价域名展开区域 */
.special-expand {
    background-color: var(--home-card-bg);
    border: 1px solid var(--home-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--home-shadow);
    transition: all 0.3s ease;
}
.special-expand .special-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.special-expand .special-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--home-text-primary);
}
.special-expand .expand-close {
    color: var(--home-primary);
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}
.special-expand .expand-close:hover {
    text-decoration: underline;
}

/* 特价域名列表：四列网格，价格由低到高自动排列 */
.special-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* 每个条目样式（与背景明显区分） */
.special-item {
    background-color: #f3f6fc;              /* 亮主题：浅蓝灰，与白色背景区分 */        /* 与卡片背景形成对比 */
    border: 2px solid var(--home-border);          /* 加粗边框增强边界感 */
    border-radius: 30px;
    padding: 10px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);     /* 轻微阴影提升立体感 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.1s, box-shadow 0.2s, border-color 0.2s;
}
body.dark-mode .special-item {
    background-color: #2d3748;              /* 暗主题：深蓝灰，与深色背景区分 */
}
.special-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--home-primary);              /* 悬停时边框变色 */
}
.special-item .tld {
    font-weight: 600;
    font-size: 1rem;
    color: var(--home-text-primary);
}
.special-item .price {
    color: var(--home-primary);
    font-weight: 600;
    background-color: color-mix(in srgb, var(--home-primary) 10%, transparent);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.9rem;
}
.loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--home-text-secondary);
    padding: 2rem 0;
}

/* 手机端适配 */
@media (max-width: 640px) {
    .special-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .special-list {
        grid-template-columns: 1fr;
    }
}

.ticket-reply-form {
    border-top: 1px dashed #ccc;
    padding-top: 15px;
}
.reply-item {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.my-reply {
    background-color: #e9f7fe;
}
.admin-reply {
    background-color: #f0f9eb;
}

/* 工单列表容器滚动 */
#ticketList {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch; /* 移动端平滑滚动 */
}

/* 表格单元格内容换行 */
#ticket-table td,
#ticket-table th {
    word-break: break-word;
    white-space: normal; /* 确保文本正常换行 */
}

/* 可选：给详情行内容也加上滚动，防止内部过长 */
.ticket-detail-container {
    max-width: 100%;
    overflow-x: auto;
}
/* 工单表格样式 */
#ticket-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--table-bg);
    color: var(--table-text-color);
}

#ticket-table th,
#ticket-table td {
    padding: 10px;
    border-bottom: 1px solid var(--table-border-color);
}

#ticket-table th {
    background-color: var(--table-header-bg);
    font-weight: 600;
}

#ticket-table tbody tr:hover {
    background-color: var(--table-hover-bg);
}

/* 详情行背景 */
.ticket-detail-row td {
    background-color: var(--detail-bg);
    color: var(--detail-text-color);
}

.ticket-full-detail p {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* 容器溢出控制（保持原有功能） */
#ticketList {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

#ticket-table td,
#ticket-table th {
    word-break: break-word;
    white-space: normal;
}

.ticket-detail-container {
    max-width: 100%;
    overflow-x: auto;
}
.reply-item {
    margin: 10px 0;
    padding: 10px;
    background: var(--reply-bg);
    border-left: 4px solid transparent;
    border-radius: 4px;
    color: var(--reply-text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.my-reply {
    border-left-color: var(--reply-my-border);
}

.admin-reply {
    border-left-color: var(--reply-admin-border);
}

.ticket-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    background: var(--badge-bg);
    color: var(--badge-text);
}

/* 原有表格和容器样式保持不变（如溢出控制等） */
#ticketList {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

#ticket-table td,
#ticket-table th {
    word-break: break-word;
    white-space: normal;
}

.ticket-detail-container {
    max-width: 100%;
    overflow-x: auto;
}


/* 定义亮色主题变量 */
:root {
    --my-reply-bg: #f5f5f5;     /* 客服回复背景：浅灰色 */ 
    --admin-reply-bg: #e3f2fd;    /* 自己回复背景：浅蓝色 */
    --reply-text-color: #000000;  /* 文字颜色 */
}


/* 暗色主题适配（跟随系统） */
@media (prefers-color-scheme: dark) {
    :root {
        --my-reply-bg: #2d2d2d; /* 深灰色 */
        --admin-reply-bg: #1e3a5f;   /* 深蓝色，保证对比度 */
        --reply-text-color: #ffffff;
        /* 亮色主题（默认） */
        --bg-payment: #f8f9fc;
        --border-payment: #e2e8f0;
        --heading-color: #1e2b4f;
        --price-color: #28a745;
        --text-secondary: #666;
        --btn-paypal-bg: #0070ba;
        --btn-paypal-text: #fff;
        --help-text-color: #6c757d;
    }
    /* 暗色主题（通过给 html 或 body 添加类 .dark-theme 触发） */
    .dark-theme {
        --bg-payment: #2d3748;
        --border-payment: #4a5568;
        --heading-color: #e2e8f0;
        --price-color: #68d391;
        --text-secondary: #a0aec0;
        --btn-paypal-bg: #0d6efd;
        --btn-paypal-text: #fff;
        --help-text-color: #cbd5e0;
    }
}

/* 工单回复公共样式 */
.reply-item {
    padding: 12px 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    line-height: 1.5;
    color: var(--reply-text-color);
}

.my-reply {
    background-color: var(--my-reply-bg);
    text-align: left; 
}

.admin-reply {
    background-color: var(--admin-reply-bg);
    text-align: right;
}

.ticket-row.closed {
    background-color: #f5f5f5;
    color: #999;
    text-decoration: line-through; /* 可选，划掉文字表示已关闭 */
}
.ticket-row.closed .ticket-status {
    color: #dc3545; /* 红色表示关闭状态 */
}
/* 语言切换按钮容器 */
.lang-switch {
    display: inline-flex;
    gap: 8px;
    margin-left: 15px;
}

/* 语言切换按钮容器 */
.lang-toggle {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px; /* 两个按钮之间的间距 */
}

/* 语言按钮样式 */
.lang-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    line-height: 1;
    min-width: 45px;
    text-align: center;
}

.lang-btn:hover {
    background: var(--table-row-hover);
}

.lang-btn.active {
    background: var(--btn-primary-bg);
    color: white;
    border-color: transparent;
}

/* 主题切换按钮样式（如果尚未统一，可参考 .lang-btn 调整） */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s;
    min-width: 45px;
    text-align: center;
}

.theme-toggle:hover {
    background: var(--table-row-hover);
}

.payment-options {
    margin-bottom: 30px;
    padding: 20px;
    background: #d4edda;
    border-radius: 12px;
    border: 1px solid var(--border-payment);
}

.payment-options h3 {
    margin-top: 0;
    color: var(--heading-color);
    font-size: 1.25rem;
}

.payment-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--price-color);
}

.period {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-paypal {
    background: var(--btn-paypal-bg);
    color: var(--btn-paypal-text);
    border: none;
    padding: 12px 24px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-paypal:hover {
    opacity: 0.9;
}

.help-text {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--help-text-color);
}