:root {
    /* Solo modo oscuro - paleta unificada */
    --color-primary: #000c18;
    --color-background: #0f1c2d;
    --color-secondary: #162942;
    --color-accent: #284366;
    --color-text: #b8c5d9;
    --color-heading: #ffffff;
    --color-hover: #64ffda;
}

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

body {
    font-family: "Glegoo", serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    position: relative;
}

.header h1 {
    color: var(--color-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: var(--color-hover);
    font-size: 1.2rem;
    font-weight: 400;
}

/* Back link */
.back-link {
    position: absolute;
    top: 10px;
    left: 0;
    color: var(--color-hover);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

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

/* Form Section */
.form-section {
    margin-bottom: 40px;
}

/* Cards */
.card {
    background: var(--color-secondary);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 12, 24, 0.3);
    border: 1px solid var(--color-accent);
}

.card h2 {
    color: var(--color-heading);
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
}

/* Features */
.features {
    display: grid;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--color-accent);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature p {
    margin: 0;
    font-size: 1rem;
}

/* Buttons */
.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 250px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(45deg, var(--color-hover), #40e0d0);
    color: var(--color-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(100, 255, 218, 0.4);
}

.btn-secondary {
    background: var(--color-accent);
    color: var(--color-heading);
    border: 2px solid var(--color-hover);
}

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

.btn-full {
    width: 100%;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    background: var(--color-secondary);
    border-radius: 15px;
}

.footer p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.whatsapp-link {
    display: inline-block;
    padding: 12px 25px;
    background: #25d366;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    background: #128c7e;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--color-secondary);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-mascota {
    max-width: 400px;
    text-align: center;
}

.close {
    color: var(--color-text);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--color-hover);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--color-heading);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--color-accent);
    border-radius: 10px;
    background: var(--color-primary);
    color: var(--color-heading);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-hover);
}

.form-group input::placeholder {
    color: var(--color-text);
}

.form-help {
    display: block;
    color: var(--color-text);
    font-size: 0.9rem;
    margin-top: 5px;
    font-style: italic;
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--color-accent);
}

.form-footer p {
    margin: 0;
    color: var(--color-text);
}

.form-footer a {
    color: var(--color-hover);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--color-heading);
}

.apodo-status {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

.apodo-disponible {
    color: #4caf50;
}

.apodo-no-disponible {
    color: #f44336;
}

/* Mascotas Grid */
.mascotas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: var(--color-primary);
    border-radius: 10px;
    border: 2px solid var(--color-accent);
}

.mascota-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    aspect-ratio: 1;
    position: relative;
}

.mascota-item:hover {
    transform: scale(1.05);
    border-color: var(--color-hover);
}

.mascota-item.selected {
    border-color: var(--color-hover);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.5);
}

.mascota-item.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--color-hover);
    color: var(--color-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.mascota-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#mascotaPreview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 15px;
    margin: 20px auto;
    display: block;
}

#mascotaMessage {
    color: var(--color-hover);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Promo Content */
.promo-content {
    text-align: center;
}

.promo-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Error messages */
.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    color: #4caf50;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

.warning-message {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    color: #ffc107;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        padding: 40px;
    }

    .header h1 {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.4rem;
    }

    .buttons-container {
        flex-direction: row;
        justify-content: center;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .mascotas-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .modal-content {
        margin: 10% auto;
        width: 80%;
    }

    .back-link {
        position: absolute;
        top: 30px;
        left: 0;
    }
}

@media (min-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .mascotas-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-hover);
}
