/* ============================================
   index.css - 首页专属样式
   ============================================ */

/* 首页hero区域标题和LOGO */
.hero-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.hero-logo {
    height: 90px;
    width: 90px;
    background-image: var(--wg-logo);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.home-top-section {
    background: linear-gradient(135deg, rgba(26, 62, 114, 0.85), rgba(10, 21, 41, 0.9)),
        url('../img/banner/soldier-carrying-shell.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: visible;
    padding-top: 20px;
}

.home-hero {
    padding: 40px 0;
    position: relative;
    overflow: visible;
    min-height: 240px;
    height: auto;
    background: transparent;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 107, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255, 107, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.home-hero::after {
    display: none;
}

.hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.home-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(255, 107, 0, 0.5));
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 0 30px rgba(255, 107, 0, 0.5));
    }

    25% {
        filter: drop-shadow(0 0 40px rgba(255, 107, 0, 0.7));
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
        filter: drop-shadow(0 0 50px rgba(255, 107, 0, 0.6));
    }

    75% {
        filter: drop-shadow(0 0 40px rgba(255, 107, 0, 0.7));
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: 4px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--wg-accent);
    margin: 0;
    font-weight: 500;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 650px;
    margin: 0;
    line-height: 1.4;
}

.hero-stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hero-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wg-accent);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

.hero-stat-divider {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.hero-search {
    display: flex;
    align-items: center;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: visible;
    transition: all 0.3s ease;
    max-width: 550px;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.hero-search:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--wg-accent);
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.2);
    border-radius: 25px 25px 0 0;
}

.hero-search:focus-within .hero-search-btn {
    border-radius: 0 25px 0 0;
}

.hero-search.has-dropdown {
    border-radius: 25px 25px 0 0;
}

.hero-search.has-dropdown:focus-within {
    border-radius: 25px 25px 0 0;
}

.hero-search-input {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--wg-white);
    font-size: 0.95rem;
    outline: none;
}

.hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hero-search-btn {
    padding: 10px 18px;
    background: var(--wg-accent);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 30px 30px 0;
}

.hero-search.has-dropdown .hero-search-btn {
    border-radius: 0 25px 0 0;
}

.hero-search-btn:hover {
    background: #ff8533;
}

.hero-search-btn svg {
    width: 20px;
    height: 20px;
    color: var(--wg-dark);
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: -1px;
    right: -1px;
    margin-top: 1px;
    background: rgba(20, 35, 60, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0 0 25px 25px;
    max-height: 350px;
    overflow: hidden;
    display: none;
    z-index: 999;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-dropdown-content {
    padding: 8px 0;
    max-height: 350px;
    overflow-y: auto;
    margin-right: 2px;
}

.search-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown-content::-webkit-scrollbar-track {
    background: transparent;
}

.search-dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 0, 0.4);
    border-radius: 3px;
}

.search-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 0, 0.6);
}

.search-dropdown.visible {
    display: block;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--wg-white);
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.search-item-type {
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-item-type.map {
    background: rgba(46, 125, 50, 0.3);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.search-item-type.tank {
    background: rgba(33, 150, 243, 0.3);
    color: #42a5f5;
    border: 1px solid rgba(66, 165, 245, 0.4);
}

.search-item-type.medal {
    background: rgba(255, 152, 0, 0.3);
    color: #ffb74d;
    border: 1px solid rgba(255, 183, 77, 0.4);
}

.search-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
}

.search-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item-icon.icon-fallback {
    background: linear-gradient(135deg, #1a3e72, #2a5a9f);
}

.search-item-icon.map {
    background: rgba(46, 125, 50, 0.2);
}

.search-item-icon.tank {
    background: rgba(33, 150, 243, 0.2);
}

.search-item-icon.medal {
    background: rgba(255, 152, 0, 0.2);
}

.search-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.search-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.3;
    text-align: left;
}

.search-item-name mark {
    background: transparent;
    color: var(--wg-accent);
    font-weight: 700;
}

.search-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    line-height: 1.4;
}

.search-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.search-loading {
    position: absolute;
    top: 100%;
    left: -1px;
    right: -1px;
    margin-top: 1px;
    background: rgba(20, 35, 60, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0 0 25px 25px;
    padding: 25px 20px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 999;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-loading.visible {
    display: flex;
    animation: loadingFadeIn 0.25s ease-out;
}

@keyframes loadingFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-loading-spinner {
    width: 36px;
    height: 36px;
    position: relative;
}

.search-loading-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.search-loading-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--wg-accent);
    border-right-color: var(--wg-accent);
    border-radius: 50%;
    animation: searchSpin 0.7s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes searchSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.search-loading-dots {
    display: flex;
    gap: 6px;
    margin-top: -5px;
}

.search-loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--wg-accent);
    border-radius: 50%;
    animation: loadingDot 1.2s ease-in-out infinite;
}

.search-loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.search-loading-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.search-loading-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes loadingDot {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.search-loading-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

@keyframes loadingTextPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.search-no-result {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.search-more {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: var(--wg-accent);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.search-more:hover {
    background: rgba(255, 107, 0, 0.1);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--wg-white);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    letter-spacing: 2px;
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--wg-accent), transparent);
}

.section-title::before {
    left: 50%;
    transform: translateX(-100px);
}

.section-title::after {
    left: 50%;
    transform: translateX(20px);
}

.modules-section {
    padding: 60px 0;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
}

.module-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.9) 0%, rgba(31, 31, 31, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--wg-accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.module-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.05), transparent);
    transition: left 0.6s ease;
}

.module-card:hover {
    border-color: rgba(255, 107, 0, 0.5);
    box-shadow:
        0 10px 40px rgba(255, 107, 0, 0.15),
        0 0 0 1px rgba(255, 107, 0, 0.1);
    transform: translateY(-5px);
}

.module-card:hover::before {
    opacity: 1;
}

.module-card:hover::after {
    left: 100%;
}

.module-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.module-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: iconShine 3s ease-in-out infinite;
}

@keyframes iconShine {

    0%,
    100% {
        transform: rotate(45deg) translateY(100%);
    }

    50% {
        transform: rotate(45deg) translateY(-100%);
    }
}

.maps-icon {
    background: transparent;
    box-shadow: none;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.image-card {
    flex-direction: row !important;
    padding: 0 !important;
    gap: 0 !important;
    align-items: stretch !important;
}

.card-image-wrapper {
    width: 350px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
}

.card-image-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.card-slide {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.card-content {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px 25px;
    flex: 1;
}

.card-info {
    flex: 1;
}

.image-card-reverse {
    flex-direction: row !important;
}

.image-card-reverse .card-content {
    order: 1;
}

.image-card-reverse .card-image-wrapper {
    order: 2;
}

.image-card-reverse .module-arrow {
    transform: rotate(180deg);
}

.image-card-reverse:hover .module-arrow {
    transform: rotate(180deg) translateX(8px);
}

.crew-icon {
    background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
}

.medals-icon {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
}

.settings-icon {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    box-shadow: 0 8px 20px rgba(156, 39, 176, 0.3);
}

.icon-symbol {
    font-size: 32px;
    position: relative;
    z-index: 1;
}

.module-info {
    flex: 1;
}

.module-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--wg-white);
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.module-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.module-stats {
    display: flex;
    gap: 15px;
}

.module-stats .stat {
    font-size: 0.9rem;
    color: var(--wg-accent);
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(255, 107, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.module-arrow {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

.module-card:hover .module-arrow {
    color: var(--wg-accent);
    transform: translateX(8px);
}

.features-section {
    padding: 60px 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    text-align: center;
    padding: 35px 25px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 107, 0, 0.2);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 56px;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.feature-item h4 {
    font-size: 1.2rem;
    color: var(--wg-white);
    margin: 0 0 12px 0;
    font-weight: 600;
    letter-spacing: 1px;
}

.feature-item p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-title-wrapper {
        gap: 12px;
    }

    .hero-logo {
        height: 40px;
        width: 40px;
    }

    .home-hero {
        padding: 20px 0;
        min-height: auto;
        height: auto;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        padding: 0 20px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .module-card {
        padding: 20px;
        gap: 15px;
    }

    .image-card {
        padding: 0 !important;
        gap: 0 !important;
    }

    .card-image-wrapper {
        width: 200px;
    }

    .module-icon {
        width: 55px;
        height: 55px;
    }

    .icon-symbol {
        font-size: 26px;
    }

    .module-title {
        font-size: 1.1rem;
    }

    .module-desc {
        font-size: 0.85rem;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--wg-accent), #ff8533);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    color: var(--wg-white);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .hero-title-wrapper {
        gap: 12px;
    }

    .hero-logo {
        height: 40px;
        width: 40px;
    }

    .home-hero {
        padding: 20px 0;
        min-height: auto;
        height: auto;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        padding: 0 20px;
    }

    .hero-stats-bar {
        gap: 12px;
        padding: 10px 15px;
    }

    .hero-stat-number {
        font-size: 1.2rem;
    }

    .hero-stat-label {
        font-size: 0.65rem;
    }

    .hero-stat-divider {
        height: 20px;
    }

    .hero-search {
        max-width: 300px;
    }

    .hero-search-input {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .search-dropdown {
        max-height: 280px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

.hero-stat-number.skeleton,
.module-stats .stat.skeleton {
    display: inline-block;
    min-width: 30px;
    height: 1.2em;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 4px;
}

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

    100% {
        background-position: -200% 0;
    }
}

.card-image-wrapper.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}