@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardSwipe {
    0% { 
        transform: rotateY(90deg) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: rotateY(0deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes expandCard {
    from { 
        height: 180px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    to { 
        height: auto;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Estilos base */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #212c47;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #212c47;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    animation: fadeOut 0.5s ease-out 2s forwards;
}

.preloader-card {
    width: 300px;
    height: 180px;
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.preloader-logo {
    width: 80%;
    max-height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
}

.preloader-text {
    font-weight: 600;
    font-size: 22px;
    color: #333;
}

/* Contenedor principal con animación */
.custom-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    margin-top: 10vh;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 2.5s forwards;
}

/* Tarjeta con efecto RFID */
.floating-container {
    width: 100%;
    max-width: 500px;
    padding: 30px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    box-sizing: border-box;
    transform-origin: center;
    animation: cardSwipe 0.8s ease-out 2.5s forwards,
                expandCard 0.6s ease-out 3.3s forwards;
    height: 180px;
    overflow: hidden;
}

.floating-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Contenido inicial (logo + nombre) */
.card-header {
    animation: fadeIn 0.5s ease-out 3.3s both;
}

.header-image {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 3.5s forwards;
}

.name {
    font-weight: 600;
    font-size: 26px;
    margin: 0 0 20px 0;
    color: #333333;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 3.6s forwards;
}

/* Contenido secundario (se muestra después) */
.card-content {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 3.9s forwards;
}

.button-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease-out forwards;
}

/* Animaciones escalonadas para los botones */
.button-container:nth-child(1) { animation-delay: 4.1s; }
.button-container:nth-child(2) { animation-delay: 4.2s; }
.button-container:nth-child(3) { animation-delay: 4.3s; }
.button-container:nth-child(4) { animation-delay: 4.4s; }
.button-container:nth-child(5) { animation-delay: 4.5s; }

.button {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    background: #000000;
    text-align: center;
    display: block;
    box-sizing: border-box;
    width: 100%;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.button:hover {
    opacity: 0.9;
}

.transfer-data {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    white-space: pre-wrap;
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
}

.action-button {
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 4.6s forwards;
}

.action-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.action-button.copied {
    background-color: #4CAF50;
}

.action-buttons-container {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    margin-right: 10px;
    flex-shrink: 0;
}

.button-text {
    flex-grow: 1;
    text-align: left;
    margin-left: 5px;
}

@media (max-width: 400px) {
    .button-text {
        text-align: center;
    }
    .floating-container {
        padding: 20px;
    }
    .preloader-card {
        width: 90%;
        height: 160px;
    }
}

.action-button .icon-container {
    margin-right: 8px;
    width: 30px;
    height: 30px;
}


.icon-container svg {
    width: 18px;
    height: 18px;
    fill: #000000;
}
