/* 
 * Builddreams 响应式样式
 * 支持移动设备和不同屏幕尺寸
 */

/* ===== 响应式设计断点 ===== */
@media screen and (max-width: 768px) {
    /* 通用调整 */
    .container {
        padding: 0 1rem;
    }
    
    .section-container {
        padding: var(--spacing-lg) 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    /* 导航栏响应式 */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transform: translateX(-100%);
        transition: var(--transition-all);
        z-index: 999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: var(--spacing-xl);
        opacity: 0;
    }
    
    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
    }
    
    .nav-items {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .nav-link {
        padding: 1.25rem;
        font-size: 1.25rem;
        text-align: center;
        border-radius: var(--border-radius);
        transition: var(--transition-all);
        display: block;
        background-color: rgba(255, 255, 255, 0.8);
        margin-bottom: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .nav-link:hover {
        background-color: rgba(74, 144, 226, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .nav-container {
        gap: 1rem;
        justify-content: space-between;
    }
    
    /* 电脑版菜单在小屏幕隐藏 */
    .desktop-menu {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: flex;
        order: 2;
    }
    
    .nav-join-btn {
        display: none;
    }
    
    /* 移动端菜单 */
    .mobile-nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 280px;
        height: 100vh;
        background: var(--bg-light);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 999;
    }
    
    .mobile-nav-menu.active {
        right: 0;
    }
    
    .mobile-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .mobile-menu-item {
        display: block;
        padding: 14px 16px;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 1rem;
        font-weight: 500;
        border-bottom: 1px solid var(--border-color);
        transition: all 0.2s ease;
    }
    
    .mobile-menu-item:hover {
        background: var(--bg-secondary);
        color: var(--primary-color);
        padding-left: 24px;
    }
    
    .mobile-menu-item:last-child {
        border-bottom: none;
    }
    
    /* 移动端遮罩层 */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
    
    .nav-overlay.active {
        display: block;
    }
    
    /* 首页英雄区域响应式 */
    .hero-container {
        padding: var(--spacing-xl) 1rem;
    }
    
    /* 底部图片区域响应式 */
    .hero-bottom-image {
        bottom: 20px;
        right: 20px;
    }
    
    .hero-image-container {
        padding: var(--spacing-xs);
    }
    
    .hero-bottom-img {
        width: 80px;
        height: 80px;
    }
    
    .hero-image-text {
        font-size: 0.75rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem !important;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hero-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .minecraft-image-placeholder {
        height: 300px;
    }
    
    .minecraft-image-placeholder i {
        font-size: 3rem;
    }
    
    .hero-background-info {
        position: relative;
        bottom: 0;
        right: 0;
        margin-top: var(--spacing-md);
        text-align: center;
    }
    
    /* 特色功能响应式 */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature-card {
        padding: var(--spacing-md);
    }
    
    /* 玩法介绍响应式 */
    .games-list {
        gap: var(--spacing-xl);
    }
    
    .game-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* 在移动设备上取消order设置，使用自然文档流 */
    .game-item .game-content,
    .game-item .game-image {
        order: unset !important;
    }
    
    .image-placeholder {
        height: 200px;
        font-size: 4rem;
    }
    
    .game-content {
        padding: var(--spacing-md);
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    /* 服务器状态响应式 */
    .status-update-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem;
    }
    
    .refresh-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .status-card {
        padding: var(--spacing-md);
    }
    
    /* 现代背景元素响应式 */
    .bg-gradient-circle {
        opacity: 0.3;
    }
    
    .circle-1, .circle-2, .circle-3 {
        width: 200px;
        height: 200px;
    }
    
    /* 管理团队响应式 */
    .team-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .team-card {
        padding: var(--spacing-md);
    }
    
    /* 加入我们响应式 */
    .join-options {
        gap: var(--spacing-lg);
    }
    
    .join-option {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }
    
    .option-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .option-title {
        font-size: 1.25rem;
    }
    
    .option-actions {
        flex-direction: column;
    }
    
    .option-btn {
        width: 100%;
        text-align: center;
    }
    
    /* 页脚响应式 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .footer-copyright {
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    /* 超小屏幕调整 */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem !important;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .image-placeholder {
        height: 150px;
        font-size: 3rem;
    }
    
    .team-avatar {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .option-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    /* 现代背景元素超小屏幕调整 */
    .bg-gradient-circle {
        opacity: 0.2;
    }
    
    .circle-1, .circle-2, .circle-3 {
        width: 150px;
        height: 150px;
    }
    
    /* 状态更新时间显示超小屏幕调整 */
    .status-update-info {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    
    .update-note {
        font-size: 0.7rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* 平板尺寸调整 */
    .container {
        max-width: 90%;
    }
    
    .hero-container {
        gap: var(--spacing-lg);
        padding: var(--spacing-xl) 1rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1rem !important;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-item {
        gap: var(--spacing-lg);
    }
    
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 1025px) and (max-width: 1440px) {
    /* 中等桌面调整 */
    .container {
        max-width: 95%;
    }
}

@media screen and (min-width: 1441px) {
    /* 大桌面调整 */
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-description {
        font-size: 1rem !important;
    }
}

/* ===== 平板和移动设备特殊调整 ===== */
@media screen and (hover: none) and (pointer: coarse) {
    /* 触屏设备优化 */
    .btn:hover,
    .nav-link:hover,
    .feature-card:hover,
    .team-card:hover,
    .join-option:hover,
    .status-card:hover {
        transform: none;
    }
    
    .btn,
    .nav-link,
    .feature-card,
    .team-card,
    .join-option,
    .status-card {
        touch-action: manipulation;
    }
    
    /* 增加触屏按钮间距 */
    .hero-actions,
    .option-actions {
        gap: var(--spacing-md);
    }
}

/* ===== 横屏设备优化 ===== */
@media screen and (orientation: landscape) and (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* ===== 服务器状态卡片响应式 ===== */
@media (max-width: 768px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .status-card {
        min-height: auto;
    }
}

/* ===== 管理团队响应式 ===== */
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 大屏幕：恢复电脑版菜单 ===== */
@media (min-width: 769px) {
    .desktop-menu {
        display: block;
    }
    
    .desktop-menu .nav-items {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .mobile-nav-menu {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: none;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .navbar,
    .nav-join-btn,
    .hero-background-info,
    .footer {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .section-container {
        padding: 1rem 0;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}