/* WinTrust Payment Pages - Common Styles */
/* Design: Dark theme matching official website */

:root {
    --bg-primary: #0c0c0e;
    --bg-card: #121216;
    --bg-card-hover: #16161f;
    --bg-input: #18181b;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(99, 102, 241, 0.5);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-bg: rgba(99, 102, 241, 0.1);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}

/* Card Container */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Header */
.card-header {
    text-align: center;
    margin-bottom: 28px;
}

.card-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.card-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}
.subtitle {
   margin-bottom: 14px;
} 
/* Price Display */
.price-area {
    text-align: center;
    margin: 20px 0 28px;
    min-height: 60px;
}

.price {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.price-original {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 4px;
}

.coupon-tag {
    display: inline-block;
    background: var(--success-bg);
    color: var(--success);
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-left: 8px;
    vertical-align: middle;
}

/* Channel Group Labels */
.channel-grid {
   display: grid;
    /* 定义两列，每列占据相等的可用空间 */
    grid-template-columns: repeat(2, 1fr);
    /* 设置列与列、行与行之间的间距 */
    gap: 12px;
}

.channel-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    height: 100%;
}

.channel-col-title {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    min-height: 15px;
}

/* Channels Grid (legacy) */
.channels {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.channels .channel {
    flex: 1;
}

.channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: auto;
    flex: 1;
}

.channel:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: var(--bg-card-hover);
}

.channel.active {
    border-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: 0 0 0 1px var(--accent);
}

.channel-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.channel-icon svg {
    width: 100%;
    height: 100%;
}

.channel-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.channel.active .channel-name {
    color: var(--text-primary);
}

.channel-col-title{
    margin-bottom: 10px; 
}
/* Input Groups */
.input-group {
    margin-bottom: 40px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Coupon Section */
.coupon-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
    cursor: pointer;
    user-select: none;
}

.coupon-toggle span {
    font-size: 13px;
    color: var(--text-muted);
}

.toggle-track {
    width: 36px;
    height: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toggle-track.on {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-track::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 1.5px;
    left: 1.5px;
    transition: transform 0.2s ease;
}

.toggle-track.on::after {
    transform: translateX(16px);
}

.coupon-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.coupon-collapse.open {
    max-height: 120px;
}

.coupon-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding-top: 4px;
}

.coupon-row input {
    flex: 1;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}

.coupon-row input::placeholder {
    color: var(--text-muted);
}

.coupon-row input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-coupon {
    padding: 12px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: var(--bg-input);
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-coupon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-coupon.applied {
    background: var(--success-bg);
    color: var(--success);
}

.coupon-msg {
    font-size: 12px;
    color: var(--error);
    margin-bottom: 12px;
    text-align: left;
}

.coupon-msg.ok {
    color: var(--success);
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn-pay {
    background: var(--accent);
    color: white;
}

.btn-pay:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-copy {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-activate {
    background: var(--success);
    color: white;
    margin-top: 10px;
}

.btn-back {
    background: var(--bg-input);
    color: var(--text-secondary);
    margin-top: 10px;
}

.btn-back:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-cancel {
    background: transparent;
    color: var(--text-muted);
    margin-top: 14px;
    font-size: 13px;
    border: 1px solid var(--border-subtle);
}

.btn-cancel:hover {
    background: var(--bg-input);
    color: var(--text-secondary);
}

/* License Box */
.license-box {
    background: var(--bg-input);
    border: 1.5px dashed var(--border-subtle);
    padding: 18px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 14px;
    word-break: break-all;
    color: var(--accent);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.05em;
}

/* Loader */
.loader {
    border: 3px solid var(--bg-input);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
    margin: 24px auto;
}

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

/* Countdown */
.countdown {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin: 10px 0;
    letter-spacing: 0.02em;
}

/* Language Switch */
.lang-switch {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    transition: all 0.2s ease;
}

.lang-switch:hover {
    background: var(--bg-input);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Error Message */
.error {
    background: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

/* Footer Links */
.footer-links {
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Status Messages */
.status-success {
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .card {
        padding: 28px 20px;
        border-radius: var(--radius-md);
    }

    .card-header h1 {
        font-size: 19px;
    }

    .card-header .subtitle {
        font-size: 13px;
    }

    .price {
        font-size: 34px;
    }

    .channel-grid {
        gap: 10px;
    }

    .channels {
        gap: 8px;
    }

    .channel {
        padding: 12px 8px;
    }

    .channel-icon {
        width: 22px;
        height: 22px;
    }

    .channel-name {
        font-size: 11px;
    }

    .btn {
        padding: 13px;
        font-size: 14px;
    }

    .coupon-row input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .btn-coupon {
        padding: 10px 14px;
        font-size: 12px;
    }

    .countdown {
        font-size: 28px;
    }

    .license-box {
        font-size: 13px;
        padding: 14px;
    }
}

@media (max-width: 360px) {
    .card {
        padding: 24px 16px;
    }

    .card-header h1 {
        font-size: 17px;
    }

    .price {
        font-size: 30px;
    }

    .channels {
        grid-template-columns: 1fr;
    }
}
