/* ============================================ */
/* ========== 帝王风暴风 - 完整版 ========== */
/* ========== 暗夜星云风结构 + 金红配色 ========== */
/* ============================================ */

/* ===== 卡片网格容器 ===== */
.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 15px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ===== 卡片主体 ===== */
.script-card {
    position: relative;
    background: linear-gradient(145deg, rgba(20, 10, 5, 0.95), rgba(10, 5, 2, 0.98));
    border-radius: 20px;
    padding: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid rgba(255, 180, 50, 0.2);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* 金红光晕 */
.script-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(255, 180, 50, 0.06), transparent 70%);
    animation: goldenDrift 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes goldenDrift {
    0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    100% { transform: translate(-20%, -20%) scale(1.5); opacity: 0.6; }
}

/* 火焰粒子 */
.script-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 200, 100, 0.3), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255, 150, 50, 0.2), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 200, 100, 0.4), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(255, 150, 50, 0.2), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(255, 200, 100, 0.3), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(255, 150, 50, 0.2), transparent);
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 0;
    animation: fireTwinkle 3s ease-in-out infinite alternate;
}

@keyframes fireTwinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.script-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 180, 50, 0.4);
    box-shadow: 0 20px 50px rgba(255, 180, 50, 0.1), 0 0 80px rgba(255, 100, 0, 0.05);
}

/* ===== 卡片头部 ===== */
.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 180, 50, 0.12);
    position: relative;
    z-index: 1;
}

.script-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 12px rgba(255, 180, 50, 0.3));
    animation: goldenPulse 3s ease-in-out infinite;
}

@keyframes goldenPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 180, 50, 0.2)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 25px rgba(255, 100, 0, 0.5)); transform: scale(1.05); }
}

.script-name {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.script-desc {
    color: rgba(200, 180, 150, 0.7);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 3px solid rgba(255, 180, 50, 0.25);
    position: relative;
    z-index: 1;
}

/* ===== 三列布局 ===== */
.script-card-row {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: nowrap;
    position: relative;
    z-index: 1;
}

.script-col-left { flex: 2; min-width: 0; }
.script-col-center { flex: 3; min-width: 0; }
.script-col-right { flex: 2; min-width: 0; }

/* ===== 第一列：每日额度 ===== */
.limit-stack {
    background: rgba(30, 15, 5, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid rgba(255, 180, 50, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s;
}

.limit-stack:hover {
    border-color: rgba(255, 180, 50, 0.25);
    box-shadow: 0 0 30px rgba(255, 180, 50, 0.05);
}

.limit-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 6px;
    border-bottom: 1px dashed rgba(255, 180, 50, 0.06);
}
.limit-item:last-child { border-bottom: none; }

.limit-label {
    font-size: 0.7rem;
    color: rgba(200, 180, 150, 0.6);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.limit-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.limit-value.remaining-zero {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ===== 第二列：按钮组 ===== */
.action-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    justify-content: center;
}

.btn-link, .btn-copy {
    display: block;
    width: 100%;
    padding: 6px 0;
    text-align: center;
    background: rgba(30, 15, 5, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 180, 50, 0.12);
    border-radius: 40px;
    color: rgba(200, 180, 150, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.btn-link::before, .btn-copy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 180, 50, 0.08), transparent);
    transition: left 0.5s;
}

.btn-link:hover::before, .btn-copy:hover::before {
    left: 100%;
}

.btn-link:hover, .btn-copy:hover {
    background: rgba(255, 180, 50, 0.08);
    border-color: rgba(255, 180, 50, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 180, 50, 0.05);
}

/* ===== 第三列：购买 + 存量 ===== */
.purchase-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    justify-content: center;
}

.btn-buy {
    display: block;
    width: 100%;
    padding: 6px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 180, 50, 0.15), rgba(255, 100, 0, 0.15));
    border: 1px solid rgba(255, 180, 50, 0.12);
    border-radius: 40px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.btn-buy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s;
}

.btn-buy:hover::before {
    left: 100%;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 180, 50, 0.08);
    background: linear-gradient(135deg, rgba(255, 180, 50, 0.25), rgba(255, 100, 0, 0.25));
}

.stock-display {
    text-align: center;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border: 1px solid rgba(255, 180, 50, 0.08);
}

/* ===== 提取按钮 ===== */
.extract-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(255, 180, 50, 0.15), rgba(255, 100, 0, 0.15));
    color: #fff;
    cursor: pointer;
    transition: all 0.4s;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 180, 50, 0.1);
}

.extract-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s;
}

.extract-btn:hover:not(:disabled)::before {
    left: 100%;
}

.extract-btn:hover:not(:disabled) {
    transform: scale(0.98);
    box-shadow: 0 4px 30px rgba(255, 180, 50, 0.08);
    background: linear-gradient(135deg, rgba(255, 180, 50, 0.25), rgba(255, 100, 0, 0.25));
}
.extract-btn:disabled {
    background: #475569;
    opacity: 0.5;
    cursor: not-allowed;
    border: none;
}

/* ============================================ */
/* ========== 统计卡片 ========== */
/* ============================================ */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(20, 10, 5, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 22px;
    text-align: center;
    border: 1px solid rgba(255, 180, 50, 0.08);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 180, 50, 0.15);
    box-shadow: 0 0 40px rgba(255, 180, 50, 0.03);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(200, 180, 150, 0.4);
    margin-top: 5px;
    letter-spacing: 1px;
    font-weight: 500;
    text-transform: uppercase;
}

/* ============================================ */
/* ========== 激活码领取规则 ========== */
/* ============================================ */

.rules {
    background: rgba(20, 10, 5, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px 25px;
    margin-top: 25px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 180, 50, 0.08);
    position: relative;
    overflow: hidden;
}

.rules::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.rules-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ★★★ 规则列表 - 横排 ★★★ */
.rules-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* ★★★ 单个规则项 - 横排显示 ★★★ */
.rule-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: all 0.4s;
}

.rule-item:hover {
    border-color: rgba(255, 180, 50, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 180, 50, 0.02);
}

/* 数字圆标 - 左侧 */
.rule-number {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: #1a0a05;
}

/* 内容 - 右侧横排 */
.rule-content {
    flex: 1;
    min-width: 0;
}

.rule-content h3 {
    font-size: 14px;
    color: #fff;
    font-weight: 700;
    margin: 0 0 2px 0;
    text-align: left;
}

.rule-content p {
    color: rgba(200, 180, 150, 0.5);
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}

.rule-content a {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: color 0.3s;
}

.rule-content a:hover {
    color: #f59e0b;
    text-decoration: underline;
}

/* ============================================ */
/* ========== 弹窗 ========== */
/* ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(12px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: linear-gradient(145deg, rgba(20, 10, 5, 0.98), rgba(10, 5, 2, 0.99));
    border-radius: 24px;
    padding: 35px;
    max-width: 480px;
    width: 90%;
    border: 1px solid rgba(255, 180, 50, 0.1);
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 24px 24px 0 0;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    font-size: 26px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 180, 50, 0.06);
}

.activation-code {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 180, 50, 0.08);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

.activation-code::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 180, 50, 0.03), transparent, rgba(255, 100, 0, 0.03), transparent);
    animation: goldenGlow 6s linear infinite;
}

@keyframes goldenGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.code-text {
    font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 24px;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 3px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px dashed rgba(255, 180, 50, 0.2);
    word-break: break-all;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(255, 180, 50, 0.3);
}

.code-label {
    color: rgba(200, 180, 150, 0.4);
    font-size: 13px;
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.modal-info {
    margin: 15px 0;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    border-radius: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: rgba(200, 180, 150, 0.4); font-weight: 500; }
.info-row .info-value { color: #fff; font-weight: 600; }

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    text-align: center;
}

.modal-btn.btn-copy {
    background: linear-gradient(135deg, rgba(255, 180, 50, 0.15), rgba(255, 100, 0, 0.15));
    color: #fff;
    border: 1px solid rgba(255, 180, 50, 0.08);
}

.modal-btn.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 180, 50, 0.05);
    background: linear-gradient(135deg, rgba(255, 180, 50, 0.25), rgba(255, 100, 0, 0.25));
}

.modal-btn.btn-close {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-btn.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ===== 提示框 ===== */
.alert {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: 40px;
    display: none;
    z-index: 10002;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.alert.show { display: block; }
.alert.success { background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9)); color: white; }
.alert.error { background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9)); color: white; }
.alert.warning { background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9)); color: white; }

/* ===== 系统头部 ===== */
.system-header {
    text-align: center;
    margin-bottom: 30px;
}

.glow-title {
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706, #fbbf24);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: goldenText 4s linear infinite;
    padding: 10px 20px;
    display: inline-block;
}

@keyframes goldenText {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.subtitle {
    color: rgba(200, 180, 150, 0.4);
    margin-top: 10px;
    font-size: 0.9rem;
}

/* ============================================ */
/* ========== 响应式 ========== */
/* ============================================ */

@media (max-width: 1024px) {
    .rules-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .scripts-grid { grid-template-columns: 1fr; gap: 12px; }
    .script-card-row { flex-wrap: wrap; }
    .script-col-left, .script-col-center, .script-col-right { flex: none; width: 100%; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .glow-title { font-size: 1.5rem; }
    .script-card { padding: 16px; }
    .script-name { font-size: 1.1rem; }
    .script-icon { font-size: 1.6rem; }
    .limit-value { font-size: 1.2rem; }
    .extract-btn { padding: 10px; font-size: 14px; }
    .modal { padding: 25px; }
    .modal-title { font-size: 18px; }
    .code-text { font-size: 18px; }
    .modal-actions { flex-direction: column; }

    .rules {
        padding: 15px 16px;
        border-radius: 12px;
    }
    .rules-title { font-size: 16px; }
    .rules-list { grid-template-columns: 1fr 1fr; gap: 8px; }
    .rule-item { padding: 10px 12px; flex-direction: row; align-items: center; }
    .rule-number { width: 26px; height: 26px; font-size: 11px; }
    .rule-content h3 { font-size: 13px; }
    .rule-content p { font-size: 11px; }
}

@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr; }
    .stat-card { padding: 16px; }
    .stat-number { font-size: 2rem; }
    .alert { max-width: calc(100% - 40px); font-size: 13px; padding: 12px 18px; }
    .glow-title { font-size: 1.2rem; }

    .rules {
        padding: 12px;
        border-radius: 10px;
    }
    .rules-title { font-size: 14px; }
    .rules-list { grid-template-columns: 1fr; gap: 6px; }
    .rule-item { padding: 8px 12px; flex-direction: row; align-items: center; gap: 10px; }
    .rule-number { width: 22px; height: 22px; font-size: 10px; }
    .rule-content h3 { font-size: 12px; }
    .rule-content p { font-size: 11px; }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(20, 10, 5, 0.5); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #fbbf24, #f59e0b); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #fbbf24, #d97706); }