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

body {
    background: linear-gradient(145deg, #e0eaf4 0%, #cfdef3 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', 'Segoe UI', 'Roboto', monospace;
    padding: 20px;
}

.card-container {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.credit-card {
    width: 100%;
    aspect-ratio: 1.618 / 1;
    background: linear-gradient(135deg, #1a1f2e 0%, #0b0e18 100%);
    border-radius: 24px;
    box-shadow: 0 25px 45px -12px rgba(0,0,0,0.5);
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.2s;
    color: #fff;
}

.credit-card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-right: 80px;
}

.card-type {
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #F5E18A, #E5B83C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.chip-area {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    align-items: center;
}

.chip {
    width: 48px;
    height: 38px;
    background: linear-gradient(135deg, #D4AF37, #B87C1E);
    border-radius: 8px;
    position: relative;
}

.chip::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 12px;
    width: 24px;
    height: 18px;
    background: repeating-linear-gradient(45deg, #EFC77A, #EFC77A 4px, #DAA520 4px, #DAA520 8px);
    border-radius: 4px;
}

.contactless {
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255,255,240,0.7);
    border-radius: 50%;
    position: relative;
}

.contactless::after {
    content: ")))";
    font-size: 12px;
    color: rgba(255,255,240,0.8);
    position: absolute;
    top: 3px;
    left: 5px;
    letter-spacing: -1px;
}

.card-number {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    letter-spacing: 2px;
    font-weight: 600;
    background: rgba(0,0,0,0.4);
    padding: 12px 0;
    text-align: center;
    border-radius: 12px;
    margin: 10px 0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 8px;
}

.holder {
    text-transform: uppercase;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.expiry-cvv {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.expiry .expiry-label,
.cvv .cvv-label {
    font-size: 0.65rem;
    opacity: 0.7;
}

.expiry-date,
.cvv-value {
    font-size: 1rem;
    font-weight: 700;
    font-family: monospace;
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 6px;
}

.qrcode-container {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.qrcode-container canvas,
.qrcode-container img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
}

.visa-logo {
    position: absolute;
    bottom: 20px;
    left: 24px;
    font-size: 1.8rem;
    font-weight: 900;
    color: rgba(255,255,255,0.15);
    pointer-events: none;
}

.input-section {
    width: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.bin-input,
.complex-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 60px;
    border: none;
    background: #fff;
    font-size: 0.9rem;
    font-family: monospace;
    outline: none;
}

.bin-input:focus,
.complex-input:focus {
    box-shadow: 0 0 0 2px #f7d44a;
}

.btn {
    background: #000000cc;
    border: 1px solid #f7d44a;
    color: #FFD966;
    padding: 10px 20px;
    border-radius: 60px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.btn:hover {
    background: #1e1a0e;
    transform: scale(1.02);
}

.btn:active {
    transform: scale(0.98);
}

.card-type-hint {
    font-size: 0.8rem;
    background: rgba(0,0,0,0.5);
    padding: 6px 12px;
    border-radius: 40px;
    color: #FFD966;
    text-align: center;
}

.disclaimer {
    text-align: center;
    font-size: 0.7rem;
    color: #2c3e4e;
    background: rgba(255,255,240,0.7);
    padding: 10px;
    border-radius: 48px;
    width: 100%;
}

hr {
    margin: 4px 0;
    border-color: rgba(255,255,255,0.2);
}

@media (max-width: 550px) {
    .credit-card {
        padding: 18px;
    }
    .card-number {
        font-size: 1.1rem;
    }
    .card-type {
        font-size: 1.2rem;
    }
    .qrcode-container {
        width: 60px;
        height: 60px;
        top: 12px;
        right: 12px;
    }
    .card-header {
        margin-right: 70px;
    }
}

/* 科技感弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: linear-gradient(135deg, rgba(20, 25, 45, 0.95), rgba(10, 15, 30, 0.98));
    border-radius: 32px;
    padding: 28px 32px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    border: 1px solid rgba(247, 212, 74, 0.5);
    box-shadow: 0 0 30px rgba(247, 212, 74, 0.3), 0 15px 35px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #f7d44a, #e6b422, #f7d44a);
    border-radius: 34px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #f7d44a;
    text-shadow: 0 0 8px rgba(247,212,74,0.6);
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #F5E18A, #E5B83C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.modal-message {
    color: #eef2ff;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 28px;
    word-break: break-word;
}

.modal-btn {
    background: transparent;
    border: 2px solid #f7d44a;
    color: #f7d44a;
    padding: 10px 28px;
    border-radius: 40px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 1px;
}

.modal-btn:hover {
    background: rgba(247, 212, 74, 0.2);
    box-shadow: 0 0 12px rgba(247,212,74,0.6);
    transform: scale(1.02);
}

.modal-btn:active {
    transform: scale(0.98);
}