* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #fef7f0;
    --bg-secondary: #fff9f5;
    --bg-tertiary: #ffffff;
    --text-primary: #2d1b14;
    --text-secondary: #8b5a3c;
    --text-tertiary: #a67c5a;
    --accent-primary: #d4a574;
    --accent-secondary: #e8c4a0;
    --accent-gradient: linear-gradient(135deg, #d4a574, #e8c4a0);
    --rose-primary: #f4a6a6;
    --rose-secondary: #fde4e4;
    --gold-primary: #f6d55c;
    --gold-secondary: #fef3c7;
    --border-primary: #f0e6d2;
    --border-secondary: #e5d5c8;
    --success: #65a30d;
    --error: #dc2626;
    --heart: #ff6b9d;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Floating hearts animation */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    color: var(--heart);
    font-size: 20px;
    animation: float 6s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(254, 247, 240, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-primary);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo::after {
    content: '💕';
    position: absolute;
    right: -30px;
    top: -5px;
    font-size: 1.2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Main Content */
.main-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 120px 2rem 3rem;
    position: relative;
    z-index: 2;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Form */
.form-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.1);
    background: var(--bg-tertiary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 165, 116, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

/* Preview */
.preview-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    display: none;
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.1);
}

.preview-header {
    text-align: center;
    margin-bottom: 2rem;
}

.preview-header h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.preview-url {
    background: var(--rose-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    word-break: break-all;
    font-weight: 600;
    border: 1px solid var(--rose-primary);
}

.preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.info-cards {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-card {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-primary);
}

.info-card strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.alert-success {
    background: rgba(101, 163, 13, 0.1);
    color: var(--success);
    border: 1px solid rgba(101, 163, 13, 0.3);
}

/* Loading */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* URL Preview */
.url-preview {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    color: var(--accent-primary);
    margin-top: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-primary);
    font-weight: 500;
}

.url-preview.error {
    color: var(--error);
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.2);
}

.url-preview.success {
    color: var(--success);
    background: rgba(101, 163, 13, 0.05);
    border-color: rgba(101, 163, 13, 0.2);
}

/* Next steps */
.next-steps {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-primary);
}

.next-steps p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 100px 1rem 2rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .form-container,
    .preview-container {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .preview-actions {
        grid-template-columns: 1fr;
    }
    
    .back-link span {
        display: none;
    }
}

@keyframes successSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes confettiExplosion {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(212, 165, 116, 0.1);
    }
    50% {
        box-shadow: 0 20px 60px rgba(212, 165, 116, 0.3);
    }
}

/* Container de éxito mejorado */
.preview-container {
    animation: successSlideIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.preview-container.success-active {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Header de éxito más impactante */
.preview-header {
    position: relative;
}

.preview-header h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-shadow: 2px 2px 4px rgba(212, 165, 116, 0.3);
    animation: heartbeat 1.5s ease-in-out 3;
}

/* URL más prominente */
.preview-url {
    font-size: 1.25rem;
    font-weight: 700;
    animation: pulseGlow 3s ease-in-out infinite;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.preview-url:hover {
    transform: scale(1.05);
    cursor: pointer;
}

/* Botones más llamativos */
.preview-actions .btn {
    font-size: 1.1rem;
    padding: 1.25rem 2.5rem;
    animation: successSlideIn 1s ease-out 0.5s both;
    position: relative;
    overflow: hidden;
}

.preview-actions .btn:nth-child(1) {
    animation-delay: 0.6s;
}

.preview-actions .btn:nth-child(2) {
    animation-delay: 0.8s;
}

/* Efecto de ondas en botones */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Confetti explosion */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiExplosion 2s ease-out;
}

/* Success overlay */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    animation: successOverlay 3s ease-out;
}

@keyframes successOverlay {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

/* Notification badge */
.success-badge {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-gradient);
    color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    z-index: 1001;
    animation: successBadge 4s ease-out;
    box-shadow: 0 20px 40px rgba(212, 165, 116, 0.4);
}

@keyframes successBadge {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Info cards animadas */
.info-card {
    animation: successSlideIn 0.6s ease-out;
    animation-fill-mode: both;
}

.info-card:nth-child(1) {
    animation-delay: 1s;
}

.info-card:nth-child(2) {
    animation-delay: 1.2s;
}

/* Hearts explosion específica para éxito */
.success-heart {
    position: absolute;
    font-size: 24px;
    color: var(--heart);
    animation: successHeartFloat 3s ease-out;
    pointer-events: none;
    z-index: 1000;
}

@keyframes successHeartFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5);
    }
}

/* Responsive mejoras */
@media (max-width: 768px) {
    .preview-header h2 {
        font-size: 2.5rem;
    }
    
    .success-badge {
        padding: 1.5rem 2rem;
        font-size: 1.25rem;
    }
    
    .preview-url {
        font-size: 1rem;
    }
}

/* Ocultar header y colapsar espacio */
.header.hidden {
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.5s ease;
    pointer-events: none;
    height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

/* Ajustar container principal cuando header está oculto */
.main-container.success-mode {
    padding-top: 90px; /* Reducir padding superior */
    transition: padding-top 0.5s ease;
}