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

:root {
    --neon-green: #00ff88;
    --dark-bg: #0a0e1a;
    --card-bg: rgba(15, 23, 42, 0.6);
    --input-bg: rgba(30, 41, 59, 0.5);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --error: #ef4444;
    --success: #10b981;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated background effect */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.03) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

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

/* Container */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* Card with glass effect */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    opacity: 0.5;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
}

/* Titles */
h1 {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

/* Form */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

input {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1),
                0 0 20px rgba(0, 255, 136, 0.2);
}

input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Button */
.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--neon-green) 0%, #00cc6f 100%);
    border: none;
    border-radius: 12px;
    color: #0a0e1a;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

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

/* Error message */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Modal de QR */
.qr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.qr-modal-content {
    background: var(--card-bg);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.qr-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
}

.qr-modal-body {
    padding: 24px;
    text-align: center;
}

.qr-image-container {
    background: white;
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Links */
.link {
    color: var(--neon-green);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.link:hover {
    opacity: 0.8;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.text-center {
    text-align: center;
    margin-top: 24px;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #0a0e1a;
    animation: spin 0.6s linear infinite;
}

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

/* Welcome page specific styles */
.welcome-container {
    max-width: 1200px;
    padding: 40px 20px;
}

.welcome-header {
    text-align: center;
    margin-bottom: 48px;
}

.welcome-header h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

.welcome-message {
    font-size: 18px;
    color: var(--text-secondary);
}

.welcome-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.welcome-card h2 {
    color: var(--neon-green);
    margin-bottom: 16px;
    font-size: 24px;
}

.welcome-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.logout-btn {
    max-width: 200px;
    margin: 32px auto 0;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    box-shadow: none;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

/* Desglose de Precios */
.price-estimate {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    animation: slideIn 0.3s ease;
}

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

.price-breakdown h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: var(--text-secondary);
}

.breakdown-item:first-of-type {
    font-size: 13px;
    font-style: italic;
    color: var(--neon-green);
    border-bottom: none;
    padding-bottom: 4px;
}

.breakdown-item:last-of-type {
    border-bottom: none;
}

.breakdown-value {
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0 0;
    margin-top: 12px;
    border-top: 2px solid rgba(0, 255, 136, 0.3);
    font-size: 18px;
    font-weight: 700;
}

.total-value {
    color: var(--neon-green);
    font-size: 24px;
}

/* Responsive */
@media (max-width: 480px) {
    .card {
        padding: 32px 24px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .welcome-header h1 {
        font-size: 32px;
    }
    
    .price-breakdown h4 {
        font-size: 14px;
    }
    
    .breakdown-item {
        font-size: 12px;
    }
    
    .breakdown-total {
        font-size: 16px;
    }
    
    .total-value {
        font-size: 20px;
    }
}

/* ===== MODAL DE LINKS COMPARTIBLES ===== */
.link-option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.link-option-header h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.link-option-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.link-display-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.link-display {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    color: var(--neon-green);
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.link-display:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.header-actions-group {
    display: flex;
    gap: 12px;
}
