/* ================================================================
   CC-GEN v2.0 — 3D Card Preview
   ================================================================ */

.card-preview-container {
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.card-3d {
    width: 340px;
    height: 214px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    border-radius: 16px;
}

.card-3d:hover {
    transform: rotateY(12deg) rotateX(5deg) scale(1.03);
}

.card-3d.flipped {
    transform: rotateY(180deg);
}

.card-3d.flipped:hover {
    transform: rotateY(195deg) rotateX(5deg) scale(1.03);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Front face */
.card-front {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-radius: 16px;
    pointer-events: none;
}

/* Hologram chip */
.card-chip {
    width: 50px;
    height: 38px;
    background: linear-gradient(135deg, #d4af37, #f5d261, #d4af37, #c7a43d);
    background-size: 200% 200%;
    animation: hologram 3s ease infinite;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.card-chip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 1px;
    background: rgba(0, 0, 0, 0.15);
}

.card-chip::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: rgba(0, 0, 0, 0.15);
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-brand-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-number-display {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin: 0;
    word-spacing: 8px;
}

.card-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-holder-name {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.85;
}

.card-holder-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 4px;
}

.card-expiry-section {
    text-align: right;
}

.card-expiry-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 4px;
}

.card-expiry-value {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 1px;
}

/* Back face */
.card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    color: #fff;
    padding: 0;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.magnetic-stripe {
    width: 100%;
    height: 48px;
    background: #1a1a1a;
    margin-top: 24px;
}

.cvv-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 24px;
    gap: 12px;
    margin-top: 16px;
}

.cvv-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

.cvv-strip {
    background: #ffffff;
    color: #000;
    padding: 6px 16px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    min-width: 60px;
    text-align: center;
}

.card-back-footer {
    padding: 8px 24px;
    margin-top: auto;
    margin-bottom: 24px;
    font-size: 8px;
    opacity: 0.4;
    line-height: 1.5;
}

/* Contactless icon */
.contactless-icon {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

/* Responsive card */
@media (max-width: 480px) {
    .card-3d {
        width: 290px;
        height: 183px;
    }
    .card-number-display {
        font-size: 16px;
        letter-spacing: 2px;
    }
    .card-brand-logo {
        font-size: 18px;
    }
}
