/* Reset y modo oscuro */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0a0a0a;
    color: #f0f0f0;
    overflow-x: hidden;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}

.logo img {
    height: 40px;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-login {
    background: transparent;
    border: 1px solid #6c63ff;
}

.btn-login:hover {
    background: #6c63ff;
}

.btn-register, .btn-dashboard {
    background: #6c63ff;
}

.btn-logout {
    background: #ff4d4d;
}

/* Secciones de eventos */
.event-section {
    margin: 2rem 0;
    padding: 1rem 0;
}

.section-title {
    font-size: 1.8rem;
    padding: 0 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Carrusel horizontal */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 1rem 2rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #6c63ff;
    border-radius: 10px;
}

/* Card de invitación (preview) */
.invitation-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: #1e1e1e;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.invitation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(108, 99, 255, 0.2);
}

.card-preview {
    position: relative;
    width: 100%;
    height: 400px;
    background: #2a2a2a;
    overflow: hidden;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* Para que el clic pase al card */
}

.card-info {
    padding: 1rem;
}

.card-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card-info p {
    font-size: 0.85rem;
    color: #aaa;
}

/* Loader */
.loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 200px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #2a2a2a;
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal Fullscreen */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    overflow: hidden;
}

.fullscreen-modal .modal-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reels-viewer {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.reel-container {
    scroll-snap-align: start;
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.reel-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.edit-reel-btn {
    background: #6c63ff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s;
}

.edit-reel-btn:hover {
    transform: scale(1.05);
}

.reel-description {
    max-width: 60%;
    font-size: 0.9rem;
}

.reel-navigation {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 1001;
}

.reel-navigation button {
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
}

/* Modal de edición */
.edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.edit-modal-content {
    background: #1e1e1e;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 20px;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

.close-edit {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #aaa;
}

#dynamicFields {
    margin: 1.5rem 0;
}

#dynamicFields .field-group {
    margin-bottom: 1rem;
}

#dynamicFields label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

#dynamicFields input, 
#dynamicFields textarea, 
#dynamicFields select {
    width: 100%;
    padding: 0.75rem;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    color: white;
}

#dynamicFields input[type="color"] {
    height: 40px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-save, .btn-cancel {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
}

.btn-save {
    background: #6c63ff;
    color: white;
}

.btn-cancel {
    background: #3a3a3a;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        padding: 0.8rem 1rem;
    }
    .section-title {
        font-size: 1.4rem;
        padding: 0 1rem;
    }
    .invitation-card {
        flex: 0 0 240px;
    }
    .card-preview {
        height: 320px;
    }
    .reel-overlay {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    .reel-description {
        max-width: 100%;
        margin-bottom: 1rem;
    }
}