/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    overflow-x: hidden;
}

/* ============================
   COLOR PALETTE - Pet Friendly
   ============================ */
:root {
    --primary: #7C4DFF;
    --primary-dark: #651FFF;
    --primary-light: #B388FF;
    --secondary: #4ECDC4;
    --secondary-dark: #3DBDB5;
    --accent: #FFE66D;
    --purple: #9C27B0;
    --purple-dark: #7B1FA2;
    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-vibrant: linear-gradient(135deg, #7C4DFF 0%, #B388FF 100%);
    --gradient-cool: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    --gradient-purple: linear-gradient(135deg, #9C27B0 0%, #7C4DFF 100%);
    --shadow-soft: 0 10px 40px rgba(0,0,0,0.1);
    --shadow-medium: 0 15px 50px rgba(0,0,0,0.15);
    --shadow-strong: 0 20px 60px rgba(0,0,0,0.2);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    background: var(--gradient-main) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 2px;
}

.nav-link:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.15);
}

/* Hero Section */
.hero-section {
    padding: 140px 0 100px;
    background: var(--gradient-main);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Decorative shapes */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    transform: rotate(-15deg);
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 50%;
    height: 80%;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.hero-section h1 {
    animation: fadeInUp 1s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Hero Typography */
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.2);
}

.hero-highlight {
    background: linear-gradient(135deg, #FFE66D 0%, #4ECDC4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.8;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

.hero-strong {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    color: #FFE66D;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        font-weight: 500;
    }
    
    .hero-strong {
        font-size: 1.15rem;
        font-weight: 700;
    }
}

.hero-section p {
    animation: fadeInUp 1.2s ease;
}

.hero-section .btn {
    animation: fadeInUp 1.4s ease;
}

.hero-image {
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Buttons - Improved */
.btn-primary {
    background: var(--gradient-main) !important;
    border: none !important;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
}

.btn-outline-light {
    border: 2px solid white;
    border-radius: 12px;
    padding: 12px 26px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: white;
    color: #667eea !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.3);
}

.btn-light {
    background: white;
    color: #667eea !important;
    border-radius: 12px;
    padding: 12px 26px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-success {
    background: var(--gradient-cool) !important;
    border: none !important;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #FFE66D 0%, #FFD93D 100%) !important;
    border: none !important;
    color: #333 !important;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 230, 109, 0.4);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 230, 109, 0.5);
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 50%, #ffffff 100%);
}

.features-section h2 {
    color: #667eea;
}

.feature-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: transform 0.3s ease;
}

.feature-card:nth-child(1) .feature-icon,
.col-md-4:nth-child(1) .feature-icon {
    background: linear-gradient(135deg, rgba(255,107,107,0.15) 0%, rgba(255,142,83,0.15) 100%);
}

.feature-card:nth-child(2) .feature-icon,
.col-md-4:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, rgba(78,205,196,0.15) 0%, rgba(68,160,141,0.15) 100%);
}

.feature-card:nth-child(3) .feature-icon,
.col-md-4:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, rgba(166,108,255,0.15) 0%, rgba(144,85,232,0.15) 100%);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h4 {
    color: #333;
    font-weight: 600;
}

.feature-card p {
    color: #666;
}

/* Icon Colors */
.text-primary {
    color: #667eea !important;
}

.text-success {
    color: var(--secondary) !important;
}

.text-info {
    color: var(--purple) !important;
}

.text-warning {
    color: #FFB347 !important;
}

.text-danger {
    color: #764ba2 !important;
}

/* How It Works Section */
.how-it-works-section {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
}

.how-it-works-section h2 {
    color: #667eea;
}

.step-card {
    position: relative;
    padding: 40px 30px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.step-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-medium);
}

.step-number {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 55px;
    background: var(--gradient-main);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Pricing Section */
.pricing-section {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%);
}

.pricing-section h2 {
    color: #667eea;
}

.pricing-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.pricing-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-strong);
}

.pricing-card.featured {
    border: 3px solid var(--secondary);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-15px);
}

.badge-popular {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: #333;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255,230,109,0.4);
}

.pricing-header {
    padding: 35px 30px;
    text-align: center;
}

.pricing-header.bg-primary {
    background: var(--gradient-main) !important;
}

.pricing-header.bg-success {
    background: var(--gradient-cool) !important;
}

.pricing-header.bg-warning {
    background: linear-gradient(135deg, #FFE66D 0%, #FFD93D 100%) !important;
}

.pricing-header h3 {
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.price {
    font-size: 3.5rem;
    font-weight: 800;
}

.price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.price .period {
    font-size: 1rem;
    display: block;
    margin-top: -10px;
    opacity: 0.9;
}

.pricing-body {
    padding: 35px 30px;
}

.pricing-body ul li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.pricing-body ul li:last-child {
    border-bottom: none;
}

.pricing-body ul li i {
    margin-right: 12px;
    color: var(--secondary);
}

/* Testimonials Section */
.testimonials-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #fefefe 0%, #f9fafb 100%);
}

.testimonials-section h2 {
    color: #667eea;
}

.testimonial-card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 25px;
    font-size: 4rem;
    color: #667eea;
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.stars {
    color: #FFB347;
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin: 20px 0;
    line-height: 1.7;
}

.testimonial-author {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.testimonial-author strong {
    color: #667eea;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-main);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.cta-section h2 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    padding: 50px 0 30px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

.footer h5 {
    color: #B388FF;
    margin-bottom: 20px;
}

.footer a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #B388FF !important;
    padding-left: 5px;
}

.footer hr {
    border-color: rgba(255,255,255,0.1);
    margin: 30px 0;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-main);
    padding: 100px 20px 40px 20px; /* Padding top aumentado para navbar fijo */
}

.auth-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
    padding: 45px;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-card h2 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.form-control {
    border-radius: 12px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: #555;
}

/* Dashboard */
.dashboard-container {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}

.dashboard-header {
    background: var(--gradient-main);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
}

.pet-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.pet-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.pet-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.4;
    color: #667eea;
}

/* View Page (Public) */
.view-container {
    min-height: 100vh;
    padding-top: 80px;
    background: var(--gradient-main);
}

.pet-info-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.pet-info-header {
    background: var(--gradient-main);
    color: white;
    padding: 35px;
    text-align: center;
}

.pet-info-body {
    padding: 35px;
}

.info-item {
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #667eea;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: #333;
    font-size: 1.1rem;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alert Messages */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
}

.alert-info {
    background: linear-gradient(135deg, rgba(78,205,196,0.15) 0%, rgba(68,160,141,0.15) 100%);
    color: #2a7a72;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255,107,107,0.15) 0%, rgba(255,142,83,0.15) 100%);
    color: #c0392b;
}

.alert-success {
    background: linear-gradient(135deg, rgba(78,205,196,0.15) 0%, rgba(68,160,141,0.15) 100%);
    color: #27ae60;
}

/* Modal Customization */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-strong);
}

.modal-header {
    background: var(--gradient-main);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
}

/* QR Code Display */
.qr-display {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    margin: 20px 0;
    border: 2px dashed #e0e0e0;
}

.qr-display img {
    max-width: 300px;
    margin: 20px auto;
    display: block;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 85px 0 40px !important;
        text-align: center;
        min-height: auto !important;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .pet-image {
        width: 100px;
        height: 100px;
    }
    
    .auth-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .feature-card, .step-card, .testimonial-card {
        margin-bottom: 30px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-main);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* ============================
   GLOBAL LOADING OVERLAY
   ============================ */

#globalLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

#globalLoader.d-none {
    display: none !important;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 18px;
    font-weight: 500;
    margin-top: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================
   OPTIMIZED IMAGE LOADING
   ============================ */

#petPhoto {
    transition: opacity 0.3s ease, filter 0.3s ease;
    width: 100%;
    height: auto;
    border-radius: 15px;
}

#petPhoto.loading {
    opacity: 0.5;
    filter: blur(10px);
}

/* Skeleton loader for images */
#petPhotoContainer {
    position: relative;
    overflow: hidden;
}

#petPhotoContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    opacity: 0;
    pointer-events: none;
    border-radius: 15px;
    transition: opacity 0.3s;
}

#petPhoto.loading + #petPhotoContainer::before {
    opacity: 1;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

