/* Zephyria Civilization Styling */

/* Text brightness breathing animation - synced with background brightness */
@keyframes textBrightnessBreath {
    0% {
        filter: brightness(0.9);
    }
    50% {
        filter: brightness(1.4);
    }
    100% {
        filter: brightness(0.9);
    }
}

/* Sand Particle System */
@keyframes sandfall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift, 0)) rotate(360deg);
        opacity: 0;
    }
}

#sand-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.sand {
    position: fixed;
    width: 3px;
    height: 3px;
    background: rgba(212, 169, 97, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.zephyria-body {
    background: linear-gradient(135deg, #3d3420 0%, #2a241a 50%, #3d3420 100%);
    background-attachment: fixed;
}

.zephyria-body::before {
    animation: breathing 6s ease-in-out infinite;
}

/* Zephyria Theme Colors */
.zephyria-body .navbar {
    background: rgba(42, 36, 26, 0.95);
    border-bottom-color: #d4af37;
}

.zephyria-body footer {
    background: rgba(42, 36, 26, 0.98);
    border-top-color: #d4af37;
}

.zephyria-body footer a {
    color: #d4af37;
}

.zephyria-body footer a:hover {
    color: #f5c547;
}

/* Zephyria Header */
.zephyria-header {
    position: relative;
    overflow: hidden;
}

.zephyria-header .container {
    max-width: 55%;
    margin-left: 0;
    text-align: left;
}

.zephyria-header h1 {
    color: #d4a961;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 169, 97, 0.6), 0 0 20px rgba(212, 169, 97, 0.4), 0 0 30px rgba(212, 169, 97, 0.2);
}

.zephyria-header p {
    color: #e6bf7a;
}

/* Intro Section */
.zephyria-intro {
    background: #2a241a;
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4" result="noise" seed="2" /></filter><rect width="100" height="100" fill="%232a241a" filter="url(%23noise)" opacity="0.08"/></svg>');
    border-bottom: 2px solid rgba(201, 169, 97, 0.3);
}

.zephyria-intro .container {
    max-width: 55%;
    margin-left: 0;
    text-align: left;
}

.zephyria-intro h2 {
    color: #d4a961;
}

.zephyria-intro p {
    color: #e6d9c3;
}

/* Features Section */
.zephyria-features {
    background: #2a241a;
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4" result="noise" seed="2" /></filter><rect width="100" height="100" fill="%232a241a" filter="url(%23noise)" opacity="0.08"/></svg>');
    border-top: 2px solid rgba(201, 169, 97, 0.3);
    border-bottom: 2px solid rgba(201, 169, 97, 0.3);
}

/* Staggered Image Layout */
.staggered-image-left,
.staggered-image-right {
    width: 100%;
    padding: 3rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    background: transparent;
}

.staggered-image-left {
    justify-content: flex-start;
}

.staggered-image-left img {
    width: 45%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.staggered-image-left img:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.staggered-image-right {
    justify-content: flex-end;
}

.staggered-image-right img {
    width: 45%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.staggered-image-right img:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.image-text {
    flex: 1;
    padding: 1rem;
    text-align: center;
}

.image-text h3 {
    color: #d4a961;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(212, 169, 97, 0.5), 0 0 20px rgba(212, 169, 97, 0.3);
    animation: textBrightnessBreath 6s ease-in-out infinite;
}

.image-text p {
    color: #d0d0d0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.zephyria-features h2 {
    color: #d4a961;
}

.zephyria-features .feature-box {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15) 0%, rgba(58, 51, 38, 0.8) 100%);
    border-left: 4px solid #d4a961;
    border-radius: 4px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.zephyria-features .feature-box:hover {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.25) 0%, rgba(58, 51, 38, 0.9) 100%);
    box-shadow: 0 8px 20px rgba(201, 169, 97, 0.2);
    transform: translateY(-3px);
}

.zephyria-features .feature-box h3 {
    color: #e6bf7a;
}

.zephyria-features .feature-box p {
    color: #e6d9c3;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Magic Section */
.zephyria-magic {
    background: #2a241a;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.zephyria-magic h2 {
    color: #d4a961;
    text-align: center;
    margin-bottom: 1rem;
}

.zephyria-magic > .container > p {
    text-align: center;
    color: #e6d9c3;
    margin-bottom: 2rem;
}

.magic-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.magic-spell {
    background: rgba(201, 169, 97, 0.1);
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.magic-spell:hover {
    background: rgba(201, 169, 97, 0.2);
    border-color: #d4a961;
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.2);
}

.magic-spell h3 {
    color: #e6bf7a;
    margin-bottom: 0.5rem;
}

.magic-spell p {
    color: #e6d9c3;
    font-size: 0.95rem;
}

/* Territory Section */
.zephyria-territory {
    background: #2a241a;
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4" result="noise" seed="2" /></filter><rect width="100" height="100" fill="%232a241a" filter="url(%23noise)" opacity="0.08"/></svg>');
    border-top: 2px solid rgba(201, 169, 97, 0.3);
    border-bottom: 2px solid rgba(201, 169, 97, 0.3);
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.zephyria-territory h2 {
    color: #d4a961;
    text-align: center;
    margin-bottom: 1rem;
}

.zephyria-territory > .container > p {
    text-align: center;
    color: #e6d9c3;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.territory-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.territory-item {
    background: rgba(201, 169, 97, 0.08);
    border: 1px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.territory-item:hover {
    background: rgba(201, 169, 97, 0.15);
    border-color: #d4a961;
}

.territory-item h3 {
    color: #e6bf7a;
    margin-bottom: 0.5rem;
}

.territory-item p {
    color: #e6d9c3;
    font-size: 0.95rem;
}

/* Roles Section */
.zephyria-roles {
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.zephyria-roles h2 {
    color: #d4a961;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(212, 169, 97, 0.5), 0 0 20px rgba(212, 169, 97, 0.3);
    animation: textBrightnessBreath 6s ease-in-out infinite;
}

.zephyria-roles > .container > p {
    text-align: center;
    color: #e6d9c3;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.role {
    background: rgba(201, 169, 97, 0.1);
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.role:hover {
    background: rgba(201, 169, 97, 0.2);
    border-color: #d4a961;
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.2);
}

.role h3 {
    color: #e6bf7a;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    display: inline;
}

.role p {
    color: #e6d9c3;
    font-size: 0.95rem;
}

.cta-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(201, 169, 97, 0.3);
}

.cta-section .cta-button {
    background: linear-gradient(135deg, #d4a961 0%, #a8860f 100%);
    border-color: #d4a961;
    color: #fff;
}

.cta-section .cta-button:hover {
    background: linear-gradient(135deg, #e6bf7a 0%, #d4a961 100%);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.4);
}

@media (max-width: 768px) {
    .zephyria-header h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .magic-types {
        grid-template-columns: 1fr;
    }

    .territory-list {
        grid-template-columns: 1fr;
    }

    .roles-grid {
        grid-template-columns: 1fr;
    }
}

/* Flip Card Animation */
@keyframes flipCard {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(180deg);
    }
}

.flip-card {
    perspective: 1000px;
    margin: 1rem auto 0;
    cursor: pointer;
    display: inline-block;
}

.flip-card-inner {
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateX(180deg);
}

.flip-card-front, .flip-card-back {
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-front {
    color: #000;
    padding: 1rem 5rem;
    background: linear-gradient(135deg, #d4a961 0%, #a8860f 100%);
    border: 2px solid #d4a961;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(212, 169, 97, 0.3);
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 30%),
                linear-gradient(225deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
                linear-gradient(135deg, #2a241a 0%, #1a1410 20%, #0a0800 50%, #1a1410 80%, #2a241a 100%);
    color: #d4a961;
    transform: rotateX(180deg);
    padding: 1rem 5rem;
    border: 2px solid rgba(212, 169, 97, 0.5);
    border-radius: 4px;
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;

    .roles-grid {
        grid-template-columns: 1fr;
    }
}
