/* Base styles */
body {
    font-family: 'Lora', serif;
    color: #f0f0f0;
    line-height: 1.6;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-cormorant {
    font-family: 'Cormorant Garamond', serif;
}

.font-geist-mono {
    font-family: monospace;
}

/* Preloader */
.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #8AB4F8;
    animation: spin 1s linear infinite;
}

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

/* Button styles */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: rgba(138, 180, 248, 0.15);
    color: #fff;
    border: 1px solid rgba(138, 180, 248, 0.5);
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: rgba(138, 180, 248, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Section styles */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(138, 180, 248, 0.8), transparent);
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: #a0a0a0;
    max-width: 700px;
    margin: 0 auto;
}

/* Cards */
.card-fancy {
    background-color: rgba(25, 25, 25, 0.8);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #333;
}

.card-fancy:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3),
                0 0 15px -3px rgba(138, 180, 248, 0.15);
}

.card-image {
    height: 220px;
    overflow: hidden;
}

.card-image img {
    transition: transform 0.5s ease;
}

.card-fancy:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-family: 'Cormorant Garamond', serif;
}

/* Feature Cards */
.feature-card {
    background-color: rgba(30, 30, 30, 0.6);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    border-color: rgba(138, 180, 248, 0.5);
    box-shadow: 0 0 20px rgba(138, 180, 248, 0.1);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(138, 180, 248, 0.1);
    color: #8AB4F8;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.feature-text {
    color: #b0b0b0;
    font-size: 0.95rem;
}

/* Collapsible Section */
.collapsible-section {
    background-color: rgba(30, 30, 30, 0.6);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #333;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 500;
}

.collapsible-section[open] .collapsible-header svg {
    transform: rotate(180deg);
}

.collapsible-content {
    padding: 0 1.25rem 1.25rem;
}

/* Pathway Cards */
.pathway-card {
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
}

.pathway-front, .pathway-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    overflow: hidden;
    border-radius: 0.75rem;
    transition: transform 0.6s;
}

.pathway-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    border: 1px solid #333;
}

.pathway-back {
    background-color: #1a1a1a;
    border: 1px solid #333;
    transform: rotateY(180deg);
    padding: 1.5rem;
    overflow-y: auto;
}

.pathway-card:hover .pathway-front {
    transform: rotateY(-180deg);
}

.pathway-card:hover .pathway-back {
    transform: rotateY(0);
}

.pathway-icon {
    margin-bottom: 1.25rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(138, 180, 248, 0.1);
    border-radius: 50%;
    color: #8AB4F8;
    z-index: 2;
}

.pathway-name {
    font-size: 1.5rem;
    font-weight: 500;
    z-index: 2;
    font-family: 'Cormorant Garamond', serif;
}

.pathway-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    z-index: 0;
}

.pathway-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.pathway-sequences {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pathway-sequences li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pathway-sequences li:last-child {
    border-bottom: none;
}

.pathway-sequences li span {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.pathway-sequences li.sequence-god {
    color: #8AB4F8;
    font-weight: 500;
}

/* Tab Styles */
.tabs-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.tab-button {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: #a0a0a0;
    border: none;
    background: none;
    position: relative;
    transition: color 0.3s;
}

.tab-button:hover {
    color: #fff;
}

.tab-button.active {
    color: #8AB4F8;
}

.tab-button.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #8AB4F8;
}

/* Character Cards */
.character-card {
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
}

.character-front, .character-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.6s;
}

.character-front {
    background-color: #1a1a1a;
    border: 1px solid #333;
}

.character-back {
    background-color: #1a1a1a;
    border: 1px solid #333;
    transform: rotateY(180deg);
    padding: 1.5rem;
}

.character-card:hover .character-front {
    transform: rotateY(-180deg);
}

.character-card:hover .character-back {
    transform: rotateY(0);
}

.character-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.character-info {
    padding: 1.25rem;
}

.character-name {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-family: 'Cormorant Garamond', serif;
}

.character-title {
    color: #8AB4F8;
    font-size: 0.9rem;
}

.character-detail {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.character-detail span {
    color: #8AB4F8;
    font-weight: 500;
    margin-right: 0.25rem;
}

.character-desc {
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.75rem;
}

/* Character Thumbnails */
.character-thumbnail {
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.75rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.character-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/* World Map */
.world-map {
    position: relative;
    background-color: #0c0c0c;
    min-height: 400px;
}

.world-map img {
    display: block;
    max-width: 100%;
    height: auto;
}

.map-point {
    position: absolute;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.map-marker {
    width: 12px;
    height: 12px;
    background-color: #8AB4F8;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 rgba(138, 180, 248, 0.6);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(138, 180, 248, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(138, 180, 248, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(138, 180, 248, 0);
    }
}

.map-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 200px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 0.5rem;
    padding: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 3;
}

.map-point:hover .map-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.map-tooltip h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #8AB4F8;
}

.map-tooltip p {
    font-size: 0.85rem;
    color: #b0b0b0;
}

/* Location Cards */
.location-card {
    flex: 0 0 300px;
    height: 200px;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
}

.location-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.location-card:hover .location-image {
    transform: scale(1.05);
}

.location-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
}

.location-name {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-family: 'Cormorant Garamond', serif;
}

.location-type {
    color: #8AB4F8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.location-desc {
    color: #d0d0d0;
    font-size: 0.9rem;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s, opacity 0.3s;
    overflow: hidden;
}

.location-card:hover .location-desc {
    max-height: 100px;
    opacity: 1;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: #333;
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 30px;
}

.timeline-point {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #8AB4F8;
    background: #1a1a1a;
    z-index: 1;
}

.timeline-content {
    background: rgba(26, 26, 26, 0.7);
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid #333;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #8AB4F8;
    margin-bottom: 0.5rem;
    font-family: 'Cormorant Garamond', serif;
}

.timeline-desc {
    color: #b0b0b0;
}

/* Artifact Cards */
.artifact-card {
    background-color: #1a1a1a;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
}

.artifact-image {
    height: 200px;
    overflow: hidden;
}

.artifact-image img {
    transition: transform 0.5s;
}

.artifact-card:hover .artifact-image img {
    transform: scale(1.05);
}

.artifact-content {
    padding: 1.25rem;
}

.artifact-name {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-family: 'Cormorant Garamond', serif;
}

.artifact-type {
    color: #8AB4F8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.artifact-desc {
    color: #b0b0b0;
    font-size: 0.95rem;
}

.artifact-hover-info {
    position: absolute;
    inset: 0;
    background-color: rgba(26, 26, 26, 0.97);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    overflow-y: auto;
}

.artifact-card:hover .artifact-hover-info {
    opacity: 1;
    pointer-events: auto;
}

/* Tarot Cards */
.tarot-grid {
    width: 100%;
    margin: 0 auto;
    justify-items: center;
}

.tarot-card {
    width: 100px;
    height: 170px;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
}

.tarot-front, .tarot-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.5rem;
    transition: transform 0.6s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tarot-front {
    background: linear-gradient(135deg, #1a1a1a, #0c0c0c);
    border: 1px solid #333;
    padding: 1rem 0.5rem;
}

.tarot-back {
    background-color: #1a1a1a;
    border: 1px solid #333;
    transform: rotateY(180deg);
    padding: 0.75rem;
    text-align: center;
}

.tarot-card:hover .tarot-front {
    transform: rotateY(-180deg);
}

.tarot-card:hover .tarot-back {
    transform: rotateY(0);
}

.tarot-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #8AB4F8;
    margin-bottom: 0.5rem;
    font-family: 'Cormorant Garamond', serif;
}

.tarot-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 0.75rem;
    font-family: 'Cormorant Garamond', serif;
}

.tarot-symbol {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(138, 180, 248, 0.1);
    border-radius: 50%;
    color: #8AB4F8;
}

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

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

[data-animate] {
    opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    /* Mobile touch support for flip cards */
    .pathway-card.flipped .pathway-front,
    .character-card.flipped .character-front,
    .tarot-card.flipped .tarot-front {
        transform: rotateY(-180deg);
    }
    
    .pathway-card.flipped .pathway-back,
    .character-card.flipped .character-back,
    .tarot-card.flipped .tarot-back {
        transform: rotateY(0);
    }
    
    /* Tarot card adjustments for mobile */
    .tarot-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .tarot-card {
        width: 90px;
        height: 150px;
    }
    
    .tarot-number {
        font-size: 1.1rem;
    }
    
    .tarot-name {
        font-size: 0.8rem;
    }
    
    .tarot-symbol {
        width: 32px;
        height: 32px;
    }
    
    .tarot-back h4 {
        font-size: 0.9rem;
    }
    
    .tarot-back p {
        font-size: 0.75rem;
    }
    
    /* For touch devices, disable hover effects and use click/touch instead */
    @media (hover: none) {
        .pathway-card:hover .pathway-front,
        .character-card:hover .character-front,
        .tarot-card:hover .tarot-front {
            transform: none;
        }
        
        .pathway-card:hover .pathway-back,
        .character-card:hover .character-back,
        .tarot-card:hover .tarot-back {
            transform: rotateY(180deg);
        }
    }
}
