/**
 * USDT理财平台 - 页面通用样式
 * 包含响应式布局、导航栏、移动端适配等
 */

/* ========== 导航栏样式 ========== */
.modern-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo h2 {
    font-size: 24px;
    white-space: nowrap;
}

/* 响应式标题大小 - 大屏幕 */
@media (max-width: 1400px) {
    .nav-logo h2 {
        font-size: 20px !important;
    }
}

/* 中等屏幕 */
@media (max-width: 1200px) {
    .nav-logo h2 {
        font-size: 18px !important;
    }
}

/* 小屏幕 */
@media (max-width: 992px) {
    .nav-logo h2 {
        font-size: 16px !important;
    }
}

/* 平板 */
@media (max-width: 768px) {
    .nav-logo h2 {
        font-size: 14px !important;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.modern-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--light-gray);
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.modern-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(212, 175, 55, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.modern-nav-link:hover::before,
.modern-nav-link.active::before {
    width: 100%;
}

.modern-nav-link:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

.modern-nav-link.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.nav-icon {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* ========== 注册/登录按钮样式 ========== */
.btn-register {
    display: inline-block !important;
    background: linear-gradient(135deg, #d4af37, #d4a574) !important;
    color: #0f172a !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    position: relative !important;
    overflow: hidden !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    text-align: center !important;
    line-height: normal !important;
}

.btn-register::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translate(-50%, -50%) !important;
    transition: width 0.6s, height 0.6s !important;
}

.btn-register:hover::before {
    width: 300px !important;
    height: 300px !important;
}

.btn-register:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5) !important;
}

.btn-register:active {
    transform: translateY(0) !important;
}

.user-info {
    color: var(--light-gray);
    font-size: 14px;
}

/* ========== 移动端响应式样式 ========== */
@media (max-width: 768px) {
    /* 导航栏 */
    .modern-nav {
        padding: 12px 20px;
        flex-wrap: wrap;
    }

    .nav-logo {
        order: 1;
        flex: 0 0 auto;
    }

    .nav-right {
        order: 2;
        gap: 12px;
        flex: 0 0 auto;
    }

    .nav-menu {
        width: 100%;
        order: 3;
        display: flex !important;
        justify-content: center;
        gap: 8px;
        padding-top: 12px;
        margin-top: 12px;
        border-top: 1px solid rgba(212, 175, 55, 0.2);
        flex-wrap: wrap;
    }

    .nav-logo img {
        width: 40px !important;
        height: 40px !important;
    }

    .nav-logo h2 {
        font-size: 20px !important;
    }

    .modern-nav-link {
        font-size: 13px;
        padding: 10px 12px !important;
        background: rgba(212, 175, 55, 0.1);
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 8px;
        flex: 1;
        min-width: 80px;
        max-width: 100px;
        text-align: center;
        transition: all 0.3s ease;
        flex-direction: column;
        gap: 4px;
    }

    .modern-nav-link:hover,
    .modern-nav-link.active {
        background: rgba(212, 175, 55, 0.2);
        border-color: rgba(212, 175, 55, 0.5);
        transform: translateY(-2px);
    }

    .nav-icon {
        font-size: 20px;
    }

    .nav-right .user-info {
        font-size: 12px;
        display: none;
    }

    .btn-register {
        padding: 8px 16px !important;
        font-size: 12px !important;
    }

    /* 主内容区域 */
    .section {
        padding: 80px 20px 20px !important;
    }

    .container {
        padding: 0 16px !important;
    }

    /* 网格布局 */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* 标题 */
    h1 {
        font-size: 32px !important;
    }

    .chart-title {
        font-size: 18px !important;
    }

    /* 为什么选择我们 & 轮播图 */
    .why-us-carousel-grid {
        grid-template-columns: 1fr !important;
    }

    /* 底部 */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .footer-copyright {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center;
    }

    /* Hero区域 */
    .hero-section {
        padding: 40px 0 30px !important;
    }

    .hero-section h1 {
        font-size: 28px !important;
        margin-bottom: 16px !important;
    }

    .hero-section p {
        font-size: 16px !important;
        margin-bottom: 30px !important;
    }
}

/* ========== 产品卡片样式 ========== */
.product-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.6));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.15);
}

/* ========== 轮播图样式 ========== */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 400px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    width: 24px;
    background: var(--gold);
}

@media (max-width: 768px) {
    .carousel-container {
        height: 250px !important;
    }
}

/* ========== 页脚样式 ========== */
footer {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 60px;
    padding: 40px 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    margin-bottom: 40px;
}

.footer-divider {
    height: 1px;
    background: rgba(212, 175, 55, 0.2);
    margin: 30px 0;
}

.footer-copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== 特色卡片（为什么选择我们）========== */
.feature-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.6));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.4);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold), #d4a574);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* ========== VIP卡片样式 ========== */
.vip-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.vip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.2);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ========== 工具类样式 ========== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ========== 动画效果 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 按钮悬停效果增强 ========== */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(212, 175, 55, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ========== 平板设备适配 ========== */
@media (max-width: 1024px) and (min-width: 769px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .why-us-carousel-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}
