/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --myst-primary: #6a1b9a;
    --myst-secondary: #9c27b0;
    --myst-accent: #e91e63;
    --myst-dark: #1a0033;
    --myst-darker: #0d0019;
    --myst-light: #f3e5f5;
    --myst-gold: #ffc107;
    --myst-purple-glow: #ba68c8;
    --myst-white: #ffffff;
    --myst-gradient: linear-gradient(135deg, #6a1b9a 0%, #9c27b0 50%, #e91e63 100%);
    --myst-gradient-alt: linear-gradient(135deg, #1a0033 0%, #6a1b9a 100%);
    --myst-shadow: 0 8px 32px rgba(106, 27, 154, 0.3);
    --myst-shadow-hover: 0 12px 48px rgba(233, 30, 99, 0.4);
    --myst-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --myst-glow: 0 0 20px rgba(186, 104, 200, 0.6);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--myst-light);
    background: var(--myst-darker);
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.myst-animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(
        135deg,
        #1a0033 0%,
        #2d004d 25%,
        #4a0066 50%,
        #2d004d 75%,
        #1a0033 100%
    );
    background-size: 400% 400%;
    animation: myst-bg-flow 20s ease infinite;
}

@keyframes myst-bg-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.myst-animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(186, 104, 200, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(233, 30, 99, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(106, 27, 154, 0.1) 0%, transparent 50%);
    animation: myst-pulse 15s ease-in-out infinite;
}

@keyframes myst-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.myst-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--myst-transition);
}

/* Header Styles */
.myst-header {
    background: var(--myst-gradient);
    padding: 1.2rem 0;
    box-shadow: var(--myst-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.myst-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.myst-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--myst-white);
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.myst-logo-img {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0 0 10px rgba(186, 104, 200, 0.8));
    animation: myst-logo-glow 3s ease-in-out infinite;
}

@keyframes myst-logo-glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(186, 104, 200, 0.8)); }
    50% { filter: drop-shadow(0 0 20px rgba(233, 30, 99, 0.9)); }
}

.myst-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.myst-menu-icon {
    width: 32px;
    height: 4px;
    background: var(--myst-white);
    border-radius: 2px;
    transition: var(--myst-transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.myst-menu-toggle.active .myst-menu-icon:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.myst-menu-toggle.active .myst-menu-icon:nth-child(2) {
    opacity: 0;
}

.myst-menu-toggle.active .myst-menu-icon:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.myst-nav {
    display: flex;
}

/* Ensure nav is hidden on mobile by default */
@media (max-width: 991px) {
    .myst-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--myst-gradient-alt);
        transition: right 0.3s ease;
        z-index: 1000;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        display: none;
    }

    .myst-nav.active {
        right: 0;
        display: flex;
    }

    .myst-menu-toggle {
        display: flex;
    }
}

.myst-nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.myst-nav-link {
    color: var(--myst-white);
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: var(--myst-transition);
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.myst-nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--myst-gold);
    transition: var(--myst-transition);
    transform: translateX(-50%);
}

.myst-nav-link:hover::before,
.myst-nav-link.myst-active::before {
    width: 80%;
}

.myst-nav-link:hover,
.myst-nav-link.myst-active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: var(--myst-glow);
}

/* Hero Section */
.myst-hero {
    position: relative;
    min-height: 650px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 4rem 0;
}

.myst-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

.myst-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.2);
}

.myst-hero-content {
    text-align: center;
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

.myst-hero-title {
    font-size: 3.5rem;
    color: var(--myst-white);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(186, 104, 200, 0.8), 0 0 40px rgba(233, 30, 99, 0.5);
    animation: myst-fade-in-up 1s ease-out;
}

@keyframes myst-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.myst-hero-subtitle {
    font-size: 1.4rem;
    color: var(--myst-light);
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: myst-fade-in-up 1.2s ease-out;
}

/* Section Styles */
.myst-section {
    padding: 5rem 0;
    position: relative;
}

.myst-section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--myst-white);
    text-shadow: 0 2px 15px rgba(186, 104, 200, 0.6);
    position: relative;
}

.myst-section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--myst-gradient);
    border-radius: 2px;
    box-shadow: var(--myst-glow);
}

/* Game Cards */
.myst-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(366px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.myst-game-card {
    background: var(--myst-gradient-alt);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--myst-shadow);
    transition: var(--myst-transition);
    position: relative;
    border: 2px solid transparent;
}

.myst-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--myst-gradient);
    opacity: 0;
    transition: var(--myst-transition);
    z-index: 0;
}

.myst-game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--myst-shadow-hover);
    border-color: var(--myst-purple-glow);
}

.myst-game-card:hover::before {
    opacity: 0.1;
}

.myst-game-image {
    width: 100%;
    height: 230px;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.myst-game-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.myst-game-title {
    font-size: 1.3rem !important;
    color: var(--myst-white);
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.myst-game-description {
    color: var(--myst-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.myst-game-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--myst-gradient);
    color: var(--myst-white);
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--myst-shadow);
    transition: var(--myst-transition);
}

.myst-game-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--myst-shadow-hover);
}

/* Character Cards */
.myst-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(366px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.myst-character-card {
    background: var(--myst-gradient-alt);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--myst-shadow);
    transition: var(--myst-transition);
    border: 2px solid transparent;
}

.myst-character-card:hover {
    transform: translateY(-8px);
    border-color: var(--myst-purple-glow);
    box-shadow: var(--myst-shadow-hover);
}

.myst-character-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--myst-purple-glow);
    box-shadow: var(--myst-glow);
    transition: var(--myst-transition);
}

.myst-character-card:hover .myst-character-image {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px rgba(186, 104, 200, 0.8);
}

.myst-character-name {
    font-size: 1.4rem;
    color: var(--myst-gold);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(255, 193, 7, 0.5);
}

.myst-character-description {
    color: var(--myst-light);
    line-height: 1.7;
}

/* Quiz Section */
.myst-quiz {
    background: var(--myst-gradient-alt);
    border-radius: 20px;
    padding: 3rem;
    margin-top: 3rem;
    box-shadow: var(--myst-shadow);
}

.myst-quiz-title {
    font-size: 2rem;
    color: var(--myst-white);
    margin-bottom: 1rem;
    text-align: center;
}

.myst-quiz-subtitle {
    color: var(--myst-light);
    text-align: center;
    margin-bottom: 2rem;
}

.myst-quiz-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--myst-purple-glow);
}

.myst-quiz-question {
    font-size: 1.2rem;
    color: var(--myst-white);
    margin-bottom: 1rem;
    font-weight: 600;
}

.myst-quiz-options {
    list-style: none;
    margin-left: 1rem;
}

.myst-quiz-option {
    color: var(--myst-light);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.myst-quiz-option::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--myst-purple-glow);
}

.myst-quiz-answer {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(186, 104, 200, 0.3);
    color: var(--myst-gold);
    font-weight: 600;
}

/* Footer */
.myst-footer {
    background: var(--myst-gradient-alt);
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
    border-top: 2px solid var(--myst-purple-glow);
}

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

.myst-footer-section h3 {
    color: var(--myst-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.myst-footer-links {
    list-style: none;
}

.myst-footer-link {
    color: var(--myst-light);
    margin-bottom: 0.5rem;
    display: block;
    transition: var(--myst-transition);
}

.myst-footer-link:hover {
    color: var(--myst-gold);
    padding-left: 5px;
}

.myst-footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(186, 104, 200, 0.3);
    color: var(--myst-light);
}

.myst-compliance-logos {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.myst-compliance-logo {
    height: 50px;
    background: var(--myst-white);
    padding: 10px;
    border-radius: 8px;
    opacity: 0.9;
    transition: var(--myst-transition);
    border: 2px solid transparent;
}

.myst-compliance-logo:hover {
    opacity: 1;
    border-color: var(--myst-purple-glow);
    box-shadow: var(--myst-glow);
    transform: scale(1.05);
}

/* Contact Form */
.myst-contact-form {
    background: var(--myst-gradient-alt);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--myst-shadow);
}

.myst-form-group {
    margin-bottom: 1.5rem;
}

.myst-form-label {
    display: block;
    color: var(--myst-white);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.myst-form-input,
.myst-form-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(186, 104, 200, 0.3);
    border-radius: 8px;
    color: var(--myst-white);
    font-size: 1rem;
    transition: var(--myst-transition);
}

.myst-form-input:focus,
.myst-form-textarea:focus {
    outline: none;
    border-color: var(--myst-purple-glow);
    box-shadow: var(--myst-glow);
    background: rgba(255, 255, 255, 0.15);
}

.myst-form-textarea {
    min-height: 150px;
    resize: vertical;
}

.myst-form-btn {
    width: 100%;
    padding: 1rem;
    background: var(--myst-gradient);
    color: var(--myst-white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--myst-transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--myst-shadow);
}

.myst-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--myst-shadow-hover);
}

/* Success Modal */
.myst-success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.myst-success-modal.active {
    display: flex;
    animation: myst-fade-in 0.3s ease;
}

@keyframes myst-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.myst-success-content {
    background: var(--myst-gradient-alt);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--myst-shadow-hover);
    border: 2px solid var(--myst-purple-glow);
    animation: myst-scale-in 0.3s ease;
}

@keyframes myst-scale-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.myst-success-icon {
    font-size: 4rem;
    color: var(--myst-gold);
    margin-bottom: 1rem;
    animation: myst-bounce 0.6s ease;
}

@keyframes myst-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.myst-success-title {
    font-size: 2rem;
    color: var(--myst-white);
    margin-bottom: 1rem;
}

.myst-success-text {
    color: var(--myst-light);
    margin-bottom: 2rem;
}

.myst-success-btn {
    padding: 0.8rem 2rem;
    background: var(--myst-gradient);
    color: var(--myst-white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--myst-transition);
}

.myst-success-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--myst-shadow-hover);
}

/* Responsive Design */
@media (max-width: 991px) {
    .myst-nav-list {
        flex-direction: column;
        gap: 1.5rem;
    }

    .myst-hero-title {
        font-size: 2.5rem;
    }

    .myst-hero-subtitle {
        font-size: 1.2rem;
    }

    .myst-section {
        padding: 3rem 0;
    }

    .myst-section-title {
        font-size: 2rem;
    }

    .myst-games-grid,
    .myst-characters-grid {
        grid-template-columns: 1fr;
    }

    .myst-quiz {
        padding: 2rem 1.5rem;
    }

    .myst-contact-form {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .myst-games-grid,
    .myst-characters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .myst-hero-title {
        font-size: 2rem;
    }

    .myst-section-title {
        font-size: 1.8rem;
    }

    .myst-container {
        padding: 0 15px;
    }
}

