:root {
    --primary: #46d369;
    --secondary: #e50914;
    --dark-glass: rgba(0, 0, 0, 0.85);
    --light-glass: rgba(255, 255, 255, 0.1);
    --netflix-red: #e50914;
    --netflix-green: #46d369;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    background: #0a0a0a;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 0;
}

/* Fondo con imagen con opacidad */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('fyis.png') no-repeat center center;
    background-size: cover;
    opacity: 0.15;
    z-index: 0;
}

/* Overlay gradient */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(70, 211, 105, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

/* Partículas flotantes */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--netflix-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--netflix-green);
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) scale(1.5);
        opacity: 0;
    }
}

/* Asegurar que el contenido esté sobre las animaciones */
.fyis-card {
    position: relative;
    z-index: 10;
}

/* --- CONTENEDORES --- */
.fyis-card {
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(70, 211, 105, 0.4);
    border-radius: 20px;
    padding: 50px 60px;
    width: 90%;
    max-width: 700px;
    text-align: center;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.8), 
        0 0 40px rgba(70, 211, 105, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    animation: cardEntrance 0.8s ease;
}

.fyis-card:hover {
    border-color: rgba(70, 211, 105, 0.6);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.9), 
        0 0 60px rgba(70, 211, 105, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

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

/* --- INPUTS Y BOTONES --- */
.fyis-input {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid rgba(0, 242, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 1rem;
    transition: 0.3s;
    outline: none;
    box-sizing: border-box;
}

.fyis-btn {
    background: var(--netflix-red);
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
    margin-top: 5%;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.fyis-btn:hover {
    background: #c11119;
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(229, 9, 20, 0.6);
}

.fyis-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

.btn-buscar {
    background: var(--netflix-green);
    border: none;
    padding: 0 30px;
    border-radius: 8px;
    color: white;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(70, 211, 105, 0.4);
}

.btn-buscar:hover {
    transform: scale(1.05);
    background: #3bc257;
    box-shadow: 0 6px 25px rgba(70, 211, 105, 0.6);
}

.btn-actualizar {
    margin-top: 15px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px;
    border-radius: 14px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-actualizar:hover {
    background: var(--primary);
    color: black;
}

/* --- NUEVA VISUALIZACIÓN DE CORREOS --- */
.mail-item-new {
    width: 90%;
    max-width: 600px;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(70, 211, 105, 0.3);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(70, 211, 105, 0.15);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
    position: relative;
    z-index: 10;
}

.mail-item-new:hover {
    border-color: rgba(70, 211, 105, 0.6);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(70, 211, 105, 0.4);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mail-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mail-subject {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary);
    text-align: left;
}

.mail-date {
    font-size: 0.9rem;
    color: #aaa;
    text-align: left;
}

.mail-link-container {
    margin: 10px 0;
}

.mail-link {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    padding: 12px 25px;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.3);
}

.mail-link:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    box-shadow: 0 8px 25px rgba(255, 0, 127, 0.5);
}

.mail-expiration {
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid #ffa500;
    padding: 10px;
    border-radius: 10px;
    color: #ffcc00;
    font-size: 0.85rem;
    text-align: center;
    font-weight: bold;
}

.mail-expiration.expirado {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    color: #ff6666;
}

/* --- PANEL DE ADMINISTRACIÓN --- */
.admin-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--light-glass);
}

.token-form {
    text-align: left;
}

.tokens-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.token-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--light-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.token-item:hover {
    border-color: var(--primary);
    background: rgba(0, 242, 255, 0.1);
}

.token-info {
    flex: 1;
    text-align: left;
}

.token-code {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.token-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.85rem;
    color: #aaa;
}

.btn-eliminar {
    background: rgba(255, 0, 0, 0.3);
    border: 1px solid #ff0000;
    color: #ff6666;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
}

.btn-eliminar:hover {
    background: rgba(255, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px 0;
    }
    
    .fyis-card {
        padding: 25px 20px;
        max-width: 95%;
        margin: 10px;
    }
    
    .mail-item-new {
        width: 95%;
        padding: 15px;
        margin-top: 15px;
    }
    
    .token-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .tutorial-content {
        width: 95%;
        padding: 25px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .tutorial-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* --- TUTORIAL MODAL --- */
.tutorial-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--netflix-red);
    border: 3px solid var(--netflix-green);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.6);
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.tutorial-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(229, 9, 20, 0.8);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(229, 9, 20, 0.6);
    }
    50% {
        box-shadow: 0 8px 35px rgba(70, 211, 105, 0.8);
    }
}

.tutorial-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.tutorial-modal.active {
    display: flex;
}

.tutorial-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid var(--netflix-green);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.tutorial-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 2rem;
    cursor: pointer;
    transition: 0.3s;
}

.tutorial-close:hover {
    color: var(--netflix-red);
    transform: rotate(90deg);
}

.tutorial-step {
    display: none;
}

.tutorial-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.tutorial-step h3 {
    color: var(--netflix-green);
    margin: 0 0 20px 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutorial-step ul {
    text-align: left;
    color: #ddd;
    font-size: 1.1rem;
    line-height: 1.8;
    list-style: none;
    padding: 0;
}

.tutorial-step ul li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.tutorial-step ul li:before {
    content: "•";
    color: var(--netflix-green);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
}

.tutorial-warning {
    background: rgba(229, 9, 20, 0.2);
    border-left: 4px solid var(--netflix-red);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    color: #ff6666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutorial-success {
    background: rgba(70, 211, 105, 0.2);
    border-left: 4px solid var(--netflix-green);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    color: var(--netflix-green);
}

.tutorial-nav {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: space-between;
}

.tutorial-nav button {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.btn-prev, .btn-next {
    background: var(--netflix-green);
    color: white;
}

.btn-prev:hover, .btn-next:hover {
    background: #3bc257;
    transform: scale(1.05);
}

.btn-close-tutorial {
    background: transparent;
    border: 2px solid #666;
    color: #aaa;
}

.btn-close-tutorial:hover {
    border-color: var(--netflix-red);
    color: var(--netflix-red);
}
