/* 1. Loading Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out;
}

.loader-content {
    text-align: center;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 3px solid var(--glass);
    border-top: 3px solid var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 15px;
    background: linear-gradient(180deg, #fff 0%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.progress-bar {
    width: 200px;
    height: 2px;
    background: var(--glass);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-purple);
    transition: width 0.3s;
}

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

/* 2. Page Transitions & Layout */
#app {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    opacity: 0;
    z-index: 1;
    transition: visibility 0s 0.5s, opacity 0.5s linear;
}

.page.active {
    visibility: visible;
    opacity: 1;
    z-index: 10;
    transition: opacity 0.5s linear;
}

.content {
    padding-bottom: 100px; /* Space for bottom nav */
}

/* 3. Bottom Navigation - Custom Shape */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #fff;
    z-index: 100;
    transform: translateY(100%); /* Hidden by default */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    /* The concave shape using mask or path */
    clip-path: path('M0 0 H140 C160 0 160 40 187.5 40 C215 40 215 0 235 0 H375 V80 H0 Z');
    /* Fallback for different screens - will use a more robust responsive approach in JS/CSS */
}

/* Redefining Bottom Nav with SVG background for better compatibility */
.bottom-nav {
    background: none;
    height: 90px;
    clip-path: none;
}

.nav-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="375" height="90" viewBox="0 0 375 90" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 20C0 20 145 20 150 20C165 20 165 60 187.5 60C210 60 210 20 225 20C230 20 375 20 375 20V90H0V20Z" fill="white"/></svg>') no-repeat bottom;
    background-size: 100% 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding-bottom: 10px;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
    font-size: 0.65rem;
    font-weight: bold;
    padding-bottom: 5px;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
}

/* Icons placeholders */
.intro-icon { background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.5"><path d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>'); }
.mentors-icon { background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.5"><path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2m8-10a4 4 0 100-8 4 4 0 000 8zm11 10v-2a4 4 0 00-3-3.87m-4-12a4 4 0 010 7.75"/></svg>'); }
.rights-icon { background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.5"><path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>'); }
.register-icon { background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.5"><path d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/></svg>'); }

.nav-item.active .nav-icon { opacity: 1; }
.nav-item.active span { color: var(--accent-purple); }

.active-glow {
    filter: drop-shadow(0 0 5px var(--accent-purple));
    opacity: 1;
}

/* Central Circle */
.nav-center-circle {
    width: 60px;
    height: 60px;
    background: var(--accent-purple);
    border-radius: 50%;
    margin-bottom: 25px;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.circle-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M50 80C50 80 20 60 20 40C20 20 50 10 50 10C50 10 80 20 80 40C80 60 50 80 50 80Z" fill="white" fill-opacity="0.8"/><path d="M50 70C50 70 30 55 30 40C30 25 50 15 50 15C50 15 70 25 70 40C70 55 50 70 50 70Z" fill="%23d4af37"/></svg>');
    background-size: 60% 60%;
    background-position: center;
    background-repeat: no-repeat;
}

.bottom-nav.visible {
    transform: translateY(0);
}

:root {
    --primary-bg: #0b011d;
    --accent-purple: #7b2cbf;
    --light-purple: #9d4edd;
    --gold: #d4af37;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-white: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --rainbow: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--primary-bg);
    color: #fff;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.swiper {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide-content, .content, .home-container {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    background: radial-gradient(circle at top right, #2d0b5a 0%, #0b011d 60%),
                radial-gradient(circle at bottom left, #1a0533 0%, #0b011d 100%);
    overflow: hidden;
}

/* Home Page Specifics */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8vh 20px 5vh;
    background: none; /* Inherit from parent or use specific */
}

/* Typography */
.main-title {
    opacity: 0;
    transform: translateY(30px);
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 15px;
    position: relative;
    background: linear-gradient(180deg, #fff 20%, #b3b3b3 40%, #ffffff 60%, #808080 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
    letter-spacing: 6px;
    text-transform: uppercase;
    display: inline-block;
}

@media (max-width: 380px) {
    .main-title {
        font-size: 3rem;
        letter-spacing: 4px;
    }
    .btn-text {
        font-size: 1rem;
    }
    .intro-btn .btn-text {
        font-size: 1.2rem;
    }
}

.main-title::after {
    content: "真然心动";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 45%, rgba(255,255,255,0.8) 50%, transparent 55%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { background-position: -100% -100%; }
    100% { background-position: 200% 200%; }
}

.sub-title {
    opacity: 0;
    transform: translateY(30px);
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    font-weight: 300;
}

.section-title {
    font-size: 2rem;
    border-bottom: 1px solid var(--accent-purple);
    padding-bottom: 5px;
    margin-bottom: 30px;
}

/* Home Menu Grid */
.home-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto auto;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin-top: 20px;
    z-index: 5;
}

.menu-item {
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.2) 0%, rgba(60, 9, 108, 0.4) 100%);
    /* Gradient Border using background-clip */
    border: 1px solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: 
        linear-gradient(135deg, rgba(123, 44, 191, 0.2), rgba(60, 9, 108, 0.4)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(157, 78, 221, 0.5), rgba(255, 255, 255, 0.2));
    
    border-radius: 18px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    overflow: visible;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 1. Static highlights at corners */
.menu-item::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #fff 0%, transparent 15%, transparent 85%, #fff 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    z-index: 2;
    pointer-events: none;
}

/* 2. Multiple Moving Light Spots */
.menu-item::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    padding: 1.5px;
    background: conic-gradient(
        from var(--angle, 0deg), 
        transparent 0%, 
        rgba(255, 255, 255, 0) 10%, 
        rgba(255, 255, 255, 0.8) 12%, 
        #fff 15%, 
        rgba(255, 255, 255, 0.8) 18%,
        transparent 20%,
        transparent 40%,
        rgba(255, 255, 255, 0.6) 42%,
        #fff 45%,
        rgba(255, 255, 255, 0.6) 48%,
        transparent 50%,
        transparent 70%,
        rgba(255, 255, 255, 0.7) 72%,
        #fff 75%,
        rgba(255, 255, 255, 0.7) 78%,
        transparent 80%
    );
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
    animation: rotate-angle 4s linear infinite;
    filter: blur(1.5px) drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
    z-index: 3;
}

/* Individual Animation Overrides for Variety */
.intro-btn::after {
    animation-duration: 5.5s;
    animation-delay: -1s;
}

.mentor-btn::after {
    animation-duration: 4.2s;
    animation-direction: reverse;
    animation-delay: -2.5s;
}

.rights-btn::after {
    animation-duration: 4.8s;
    animation-delay: -0.5s;
}

.register-btn::after {
    animation-duration: 2.5s;
    background: conic-gradient(
        from var(--angle, 0deg), 
        transparent 0%, 
        rgba(255, 255, 255, 0.9) 12%, 
        #fff 15%, 
        rgba(255, 255, 255, 0.9) 18%,
        transparent 25%,
        transparent 50%,
        rgba(212, 175, 55, 0.8) 62%,
        #fff 65%,
        rgba(212, 175, 55, 0.8) 68%,
        transparent 75%
    );
    filter: blur(2px) drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-angle {
    to { --angle: 360deg; }
}

.menu-item:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        0 15px 30px rgba(123, 44, 191, 0.3);
}

.menu-item:active {
    transform: translateY(0) scale(0.98);
}

.intro-btn {
    grid-row: span 2;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 18px;
}

.menu-secondary-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.register-btn {
    grid-column: span 2;
    padding: 22px 25px;
    background-image: 
        linear-gradient(135deg, rgba(157, 78, 221, 0.3), rgba(90, 24, 154, 0.5)),
        linear-gradient(135deg, #fff 0%, #d4af37 30%, #7b2cbf 50%, #d4af37 70%, #fff 100%);
    box-shadow: 
        0 15px 35px rgba(123, 44, 191, 0.4),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.btn-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.btn-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: 1px;
    line-height: 1.2;
}

.intro-btn .btn-text {
    font-size: 1.4rem;
}

.btn-subtext {
    font-size: 0.55rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.btn-icon {
    width: 28px;
    height: 28px;
    color: var(--text-dim);
    opacity: 0.8;
}

.intro-btn .btn-icon {
    align-self: flex-end;
}

/* Home Footer */
.home-footer {
    opacity: 0;
    transform: translateY(30px);
    width: 100%;
    text-align: center;
    z-index: 5;
    margin-top: 20px;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-main {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo-divider {
    font-size: 0.8rem;
    opacity: 0.5;
}

.logo-sub {
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Bottom Decoration */
.bottom-decoration {
    position: absolute;
    bottom: -10%;
    left: 0;
    width: 100%;
    height: 40vh;
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.petal {
    opacity: 0;
    transform: translateY(30px);
    position: absolute;
    width: 80%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, rgba(123, 44, 191, 0.5) 0%, transparent 70%);
    filter: blur(40px);
}

.petal-1 {
    left: -20%;
    transform: rotate(-20deg);
}

.petal-2 {
    right: -20%;
    transform: rotate(20deg);
}

/* Intro Grid */
.concept-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.concept-item {
    opacity: 0;
    transform: translateY(30px);
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.3) 0%, rgba(123, 44, 191, 0.1) 100%);
    border-left: 3px solid var(--accent-purple);
    padding: 15px;
    border-radius: 4px;
    font-weight: bold;
}

.glass-card {
    opacity: 0;
    transform: translateY(30px);
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(15px);
    text-align: center;
}

/* Mentor Card */
.mentor-card {
    opacity: 0;
    transform: translateY(30px);
    width: 100%;
    height: 350px;
    background: linear-gradient(to bottom, rgba(123, 44, 191, 0.4), transparent);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mentor-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.mentor-tag {
    background: var(--accent-purple);
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 2px;
}

/* Rainbow Border */
.rainbow-border {
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    padding: 2px;
    border-radius: 22px;
    background: var(--rainbow);
    background-size: 400%;
    animation: rainbow 8s linear infinite;
}

.card-inner {
    background: var(--primary-bg);
    border-radius: 20px;
    padding: 30px;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* QR Grid */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
}

.qr-item {
    opacity: 0;
    transform: translateY(30px);
    aspect-ratio: 1;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 0.7rem;
    position: relative;
}

.qr-item::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
}

/* Scroll Arrow */
.scroll-arrow {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    rotate: 45deg;
    animation: bounce 2s infinite;
    z-index: 10;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0) rotate(45deg);}
    40% {transform: translateX(-50%) translateY(-10px) rotate(45deg);}
    60% {transform: translateX(-50%) translateY(-5px) rotate(45deg);}
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(90deg, #fff, #7b2cbf, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}
