:root {
    --rustic-dark: #2F1212;
    --rustic-medium: #3A181A;
    --rustic-red: #8B0000;
    --rustic-light: #A52A2A;
    --rustic-hover: #B22222;
    --white: #FFFFFF;

    --bird-light: #42A0ED;
    --bird-medium: #267CC1;
    --bird-purple: #7544EA;
    --bird-dark: #161616;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html {
    background-color: #000000;
}

body {
    background: linear-gradient(135deg, #000000 0%, #000000 50%, #2F1212 80%, #8B0000 100%);
    background-color: #000000;
    color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Overlay Pulse */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(139, 0, 0, 0.2) 0%, transparent 70%);
    animation: pulse-overlay 4s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse-overlay {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 480px;
    /* Mobile optimal width */
    padding: 40px 20px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container {
    margin-bottom: -20px;
    display: flex;
    justify-content: center;
}

.main-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.float-animation {
    animation: pulse-gentle 3s ease-in-out infinite;
}

@keyframes pulse-gentle {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 15px 30px rgba(139, 0, 0, 0.3));
    }
}

.header-text h1 {
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
}

.verified-icon {
    width: 18px;
    height: 18px;
}

.header-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rustic-hover);
    /* A lighter red for emphasis */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 4px;
}

/* Premium Buttons Section */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.premium-btn {
    position: relative;
    width: 100%;
    height: 64px;
    background: linear-gradient(145deg, var(--rustic-light), var(--rustic-red));
    border-radius: 15px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    text-decoration: none;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.premium-btn:hover {
    background: linear-gradient(145deg, #c03939, var(--rustic-hover));
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 15px 30px rgba(139, 0, 0, 0.4),
        0 0 15px rgba(255, 59, 48, 0.2);
}

.premium-btn:active {
    transform: scale(0.98);
}

.icon-wrapper {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.premium-btn span {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-grow: 1;
    text-align: center;
    /* Offset text slightly left to account for icon */
    padding-right: 40px;
}

/* Shine Effect */
.shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: 0.5s;
}

.premium-btn:hover .shine {
    left: 100%;
    transition: 0.5s;
}

/* Top Actions (Bird & Share) */
.top-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 10px;
    margin-bottom: -20px;
    /* Overlap slightly with header/logo area */
    position: relative;
    z-index: 10;
}

/* Bird System Button - Premium Implementation */
.bird-system-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--rustic-light), var(--rustic-red));
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 20;
    color: white;
}

.bird-system-btn:hover {
    background: linear-gradient(145deg, #c03939, var(--rustic-hover));
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 25px rgba(139, 0, 0, 0.4),
        0 0 15px rgba(255, 59, 48, 0.2);
}

.bird-system-btn:active {
    transform: scale(0.95);
}

/* Specific ring for active state simulation if needed */
.bird-system-btn.active-ring {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--bird-medium);
}

/* Icon Styles */
.bird-system-btn img,
.bird-system-btn svg {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0, 0, 0.2, 1);
    filter: brightness(0) invert(1);
    /* Force white icons */
}

.bird-system-btn:hover img {
    /* group-hover:scale-110 group-hover:rotate-6 */
    transform: scale(1.1) rotate(6deg);
}

/* Share Button Specific Color override if needed, but TSX uses text-current */
.bird-system-btn.share-btn-color {
    color: white;
}

/* Animation States */
.bird-system-btn.animate-bird-magic {
    animation: bird-magic 0.4s cubic-bezier(0, 0, 0.2, 1) forwards;
}

.bird-system-btn.animate-bird-magic img {
    transform: scale(1.1) rotate(12deg);
}

/* Pulse Ping Effect */
.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    pointer-events: none;
}

.bird-system-btn.animate-bird-magic .pulse-ring {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Re-defining bird-magic to match Tailwind scale-125 */
@keyframes bird-magic {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.25);
    }
}

/* Footer */
.footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    /* Floating near bottom */
    justify-content: center;
    padding-bottom: 25px;
    /* Margin from bottom to float */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    visibility: hidden;
}

.modal:target {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: default;
    /* Clicking backdrop traditionally closes, we can make it a link to #close or similar if we wrap it, but sticking to simple :target for now, close button is clearer */
}

/* Make backdrop a link to close? 
   We can't easily make the backdrop a link without changing HTML structure significantly (wrapping everything). 
   For now, we rely on the X button. 
*/

.modal-content {
    position: relative;
    width: 90%;
    max-width: 350px;
    /* Smaller card */
    background: white;
    border-radius: 2.2rem !important;
    padding: 15px;
    /* More compact */
    color: #1a1a1a;
    transform: scale(0.9) translateY(40px);
    /* Start from lower */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal:target .modal-content {
    transform: scale(1) translateY(0);
}

/* Bird Theme Modal Specifics */
/* slide-up-bounce logic is cleaner with just simple transform now, removing complex animation for simplicity in CSS-only approach */

.bird-theme {
    background: linear-gradient(135deg, #42a0ed 0%, #3490dc 30%, #4c51bf 70%, #667eea 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
}

.bird-theme .close-modal {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.modal-content:not(.bird-theme) .close-modal {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.bird-logo-circle {
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.bird-logo-circle img {
    width: 55%;
    object-fit: contain;
}

.bird-theme h2 {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    color: white;
}

.bird-theme p {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.9;
    margin-bottom: 30px;
    color: white;
}

.bird-theme .link-pill {
    background: white;
    color: #1a202c;
    padding: 15px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.bird-cta {
    background: #1a202c !important;
    color: white !important;
    width: 100%;
    padding: 18px 25px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    margin-bottom: 20px;
}

.secondary-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 2px;
    width: fit-content;
    margin: 0 auto;
}

/* Sparkle Animations */
.sparkle {
    position: absolute;
    color: rgba(255, 255, 255, 0.4);
    animation: sparkle-float 3s infinite ease-in-out;
    pointer-events: none;
}

@keyframes sparkle-float {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.2) rotate(15deg);
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Share Theme Specifics */
.share-theme {
    background: linear-gradient(135deg, #42a0ed 0%, #3490dc 30%, #4c51bf 70%, #667eea 100%);
    color: white;
    text-align: center;
    padding: 25px 20px;
    position: relative;
    overflow: hidden;
}

.share-theme .close-modal,
.bird-theme .close-modal {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    color: white;
    transition: background 0.2s;
    text-decoration: none;
}

.share-theme .close-modal:hover,
.bird-theme .close-modal:hover {
    background: rgba(0, 0, 0, 0.4) !important;
}

.share-theme .profile-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 15px;
    border-radius: 20px;
    width: 100%;
    margin-bottom: 25px;
    text-align: left;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-theme .profile-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: none;
}

.share-theme .profile-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: white;
}

.share-theme .profile-card span {
    font-size: 0.85rem;
    opacity: 0.85;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    gap: 8px;
    margin-bottom: 5px;
    /* Tighter spacing */
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}

.share-item .icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.share-item svg {
    width: 24px;
    height: 24px;
}

.share-item.copy .icon-circle {
    background: rgba(255, 255, 255, 0.2);
}

.share-item.instagram .icon-circle {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.share-item.facebook .icon-circle {
    background: #1877F2;
}

.share-item.whatsapp .icon-circle {
    background: #25D366;
}

.share-item:hover .icon-circle {
    transform: scale(1.1) translateY(-2px);
}

.share-join-section h2 {
    font-size: 1.3rem !important;
    font-weight: 800;
    margin: 5px 0 5px !important;
    color: #ffffff !important;
    letter-spacing: -0.01em;
}

.share-join-section p {
    font-size: 0.8rem !important;
    opacity: 0.95;
    margin-bottom: 12px !important;
    color: #ffffff !important;
    line-height: 1.4;
}

.share-join-section .secondary-link {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px !important;
    opacity: 0.9;
}

/* Regular Modal Styling (Horarios) */
.modal-content h2 {
    font-size: 1.5rem;
    color: var(--rustic-dark);
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .modal {
        align-items: center;
    }

    .modal-content {
        border-radius: 2rem;
        transform: scale(0.9);
        opacity: 0;
    }

    .modal:target .modal-content {
        transform: scale(1);
        opacity: 1;
    }
}

/* Schedule Page Styles - Accordion Refactor */

.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.schedule-details {
    width: 100%;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    /* transition: all 0.3s ease; */
}

/* Summary Button */
.schedule-summary {
    background: var(--rustic-red);
    color: white;
    padding: 20px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    /* Remove default triangle */
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-summary::-webkit-details-marker {
    display: none;
}

.schedule-summary:hover {
    background: var(--rustic-hover);
    transform: translateY(-2px);
}

.chevron {
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.schedule-details[open] .schedule-summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: var(--rustic-dark);
    /* Darker when open */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-details[open] .chevron {
    transform: rotate(180deg);
}

/* Content Area */
.details-content {
    background: #111;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sub-Cards (inner items) */
.sub-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
}

.badget-age {
    display: inline-block;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
    color: rgba(255, 255, 255, 0.8);
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* Time Slots */
.time-slot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: fit-content;
}

/* Row of pills */
.time-slot-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.time-pill {
    background: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
}

.center-card {
    align-items: center;
    text-align: center;
}

.large-slot {
    font-size: 1.2rem;
    padding: 12px 24px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .schedule-grid {
        max-width: 600px;
        margin: 0 auto;
    }
}