:root {
    --card-bg: #ffffff;
    --card-border: #f1f3f5;
    --input-bg: #f8f9fa;
    --input-focus-border: #0052cc;
    --text-muted: #6c757d;
    --text-dark: #212529;
}

[data-bs-theme="dark"] {
    --card-bg: #1a1d21;
    --card-border: #2d3238;
    --input-bg: #212529;
    --input-focus-border: #0052cc;
    --text-muted: #adb5bd;
    --text-dark: #f8f9fa;
}

.payment-card-container {
    max-width: 100%;
}

.card-treadox-payment {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-treadox-payment:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1) !important;
}

.input-payment {
    background-color: var(--input-bg);
    border: 1px solid transparent;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.input-payment:focus {
    background-color: var(--card-bg);
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    outline: none;
}

.card-brand-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.payment-header {
    border-bottom: 1px dashed var(--card-border);
}

.chip-visual {
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #ffd700 0%, #daa520 100%);
    border-radius: 6px;
    position: relative;
    margin-bottom: 10px;
}

.chip-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.card-mockup-container {
    perspective: 1000px;
    width: 280px;
    height: 176px;
    margin: 0 auto;
}

.card-mockup {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.75rem;
    padding: 1.25rem;
    color: white;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-face-front {
    background: linear-gradient(135deg, #111 0%, #333 100%);
    z-index: 2;
}

.card-face-back {
    background: linear-gradient(135deg, #222 0%, #111 100%);
    transform: rotateY(180deg);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.magnetic-strip {
    background: #000;
    width: 100%;
    height: 35px;
    margin-top: 1.5rem;
}

.signature-area {
    margin: 1.5rem 1rem 0;
    background: #eee;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    color: #333;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1rem;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(0,0,0,0.05) 5px, rgba(0,0,0,0.05) 10px);
}

.card-face-front .card-brand-display {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    height: 30px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.card-face-front .card-brand-display img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.card-mockup::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.card-number-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.15rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
}

.card-brand-display {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.75rem;
    line-height: 1;
}

.card-holder-display {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

.expiry-display {
    font-size: 0.85rem;
    opacity: 0.8;
}

.security-lock-icon {
    color: #198754;
}
