* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

body {
    height: 100vh;
}

#card-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    background-color: #FFF;
    perspective: 1000px;
    max-width: 100%;
}

#card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    cursor: pointer;
}

.card-face {
    backface-visibility: hidden;
}

.card-front {
    transform: rotateY(0deg);
}

#front {
    position: relative;
}

#client-info {
    position: absolute;
    text-align: left;
    width: 50%;
    top: 26%;
    left: 5%;
}

#background-front-container {
    max-height: calc(100vh - 40px);
}

#background-back-container {
    position: absolute;
    overflow: hidden;
    top: 0;
    z-index: -1;
    max-height: calc(100vh - 40px);
}

#background-front {
    max-height: calc(100vh - 90px);
}

#background-back {
    max-height: calc(100vh - 40px);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1) scaleY(.99);
}

#background-front {
    max-width: 100%;
}

#background-back {
    max-width: 99.5%;
}

#foto-usuario {
    position: absolute;
    top: 26%;
    right: 13%;
    width: 22%;
    max-width: 130px;
    z-index: 2;
}

#foto-usuario .client-image {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

#foto-usuario .client-image:hover {
    opacity: 0.85;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#loadingOverlay .overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#loadingOverlay img {
    width: 50px;
}

#loadingOverlay .overlay-text {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

#fotoSuccess {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #4CAF50;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#photoMenu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    overflow: hidden;
    min-width: 200px;
}

#photoMenu .menu-title {
    padding: 14px 20px;
    font-weight: bold;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    text-align: center;
}

#photoMenu .menu-option {
    padding: 14px 20px;
    font-size: 15px;
    color: #1a73e8;
    cursor: pointer;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

#photoMenu .menu-option:last-child {
    border-bottom: none;
}

#photoMenu .menu-option:hover {
    background: #f5f5f5;
}

#photoMenu .menu-option.danger {
    color: #d32f2f;
}

#photoBackdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

@media screen and (max-width: 360px) {
    #client-info {
        font-size: 14px;
    }
}
