/* Device Experience Styles - 设备体验样式 */

/* ==========================================================================
   体验选择器样式
   ========================================================================== */

.experience-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.experience-selector-overlay.show {
    opacity: 1;
    visibility: visible;
}

.experience-selector-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.experience-selector-modal {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.experience-selector-overlay.show .experience-selector-modal {
    transform: translateY(0);
}

.experience-header {
    text-align: center;
    margin-bottom: 30px;
}

.experience-header h2 {
    color: #00ff88;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.experience-header p {
    color: #ccc;
    font-size: 16px;
    line-height: 1.5;
}

.experience-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.experience-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.experience-option:hover {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.option-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.experience-option h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.experience-option p {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.experience-option ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
}

.experience-option li {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.btn-select {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.experience-footer {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.experience-footer p {
    color: #888;
    font-size: 12px;
    margin-bottom: 15px;
}

.btn-skip {
    background: transparent;
    color: #888;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-skip:hover {
    color: #fff;
    border-color: #666;
}

/* ==========================================================================
   PWA安装指南样式
   ========================================================================== */

.pwa-install-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pwa-install-overlay.show {
    opacity: 1;
    visibility: visible;
}

.pwa-install-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.pwa-install-modal {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pwa-install-overlay.show .pwa-install-modal {
    transform: scale(1);
}

.pwa-header {
    text-align: center;
    margin-bottom: 25px;
}

.pwa-header h2 {
    color: #00ff88;
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 600;
}

.pwa-header p {
    color: #ccc;
    font-size: 14px;
}

.pwa-instructions {
    margin-bottom: 25px;
}

.pwa-instructions h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.pwa-instructions ol {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    padding-left: 20px;
}

.pwa-instructions li {
    margin-bottom: 8px;
}

.pwa-benefits {
    background: rgba(0, 255, 136, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.pwa-benefits h3 {
    color: #00ff88;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.pwa-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pwa-benefits li {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
}

.pwa-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-pwa-install {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000;
    border: none;
    padding: 15px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-pwa-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.btn-pwa-later,
.btn-pwa-web {
    background: transparent;
    color: #888;
    border: 1px solid #444;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-pwa-later:hover,
.btn-pwa-web:hover {
    color: #fff;
    border-color: #666;
}

/* ==========================================================================
   设备特定样式
   ========================================================================== */

/* 桌面端样式 */
.desktop-mode {
    --touch-target-size: 44px;
    --font-size-base: 16px;
    --spacing-base: 16px;
}

.desktop-mode .mining-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.desktop-mode .mining-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.desktop-mode .btn {
    min-height: 40px;
    font-size: 14px;
}

/* 移动端样式 */
.mobile-mode {
    --touch-target-size: 48px;
    --font-size-base: 16px;
    --spacing-base: 12px;
}

.mobile-mode .mining-card {
    margin-bottom: 15px;
}

.mobile-mode .btn {
    min-height: 48px;
    font-size: 16px;
    padding: 12px 20px;
}

.mobile-mode .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}

/* 平板端样式 */
.tablet-mode {
    --touch-target-size: 46px;
    --font-size-base: 16px;
    --spacing-base: 14px;
}

.tablet-mode .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* PWA模式样式 */
.pwa-mode {
    padding-top: calc(80px + env(safe-area-inset-top)); /* 导航栏高度 + 安全区域 */
    padding-bottom: env(safe-area-inset-bottom);
}

.pwa-mode .navbar {
    top: env(safe-area-inset-top); /* 导航栏位置考虑安全区域 */
    height: calc(80px + env(safe-area-inset-top)); /* 导航栏高度包含安全区域 */
}

.pwa-mode .header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
}

/* PWA模式下的移动端适配 */
@media (max-width: 768px) {
    .pwa-mode {
        padding-top: calc(70px + env(safe-area-inset-top));
    }

    .pwa-mode .navbar {
        height: calc(70px + env(safe-area-inset-top));
    }

    .pwa-mode .nav-menu {
        top: calc(70px + env(safe-area-inset-top)) !important;
    }
}

@media (max-width: 480px) {
    .pwa-mode {
        padding-top: calc(65px + env(safe-area-inset-top));
    }

    .pwa-mode .navbar {
        height: calc(65px + env(safe-area-inset-top));
    }

    .pwa-mode .nav-menu {
        top: calc(65px + env(safe-area-inset-top)) !important;
    }
}

/* 响应式模式样式 */
.responsive-mode .container {
    padding: 0 15px;
}

/* 触摸优化 */
.touch-optimized button,
.touch-optimized .clickable {
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
}

.touch-optimized .mining-card {
    padding: 20px;
    margin-bottom: 15px;
}

/* 减少动画复杂度 */
.reduced-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* ==========================================================================
   提示消息样式
   ========================================================================== */

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10002;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid #333;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast-success {
    background: rgba(0, 255, 136, 0.9);
    color: #000;
    border-color: #00ff88;
}

.toast.toast-error {
    background: rgba(255, 0, 0, 0.9);
    color: #fff;
    border-color: #ff0000;
}

.toast.toast-warning {
    background: rgba(255, 165, 0, 0.9);
    color: #000;
    border-color: #ffa500;
}

/* ==========================================================================
   响应式断点
   ========================================================================== */

/* 小屏手机 */
@media (max-width: 480px) {
    .experience-selector-modal,
    .pwa-install-modal {
        padding: 20px;
        margin: 10px;
    }
    
    .experience-options {
        gap: 15px;
    }
    
    .experience-option {
        padding: 20px;
    }
    
    .option-icon {
        font-size: 36px;
    }
    
    .experience-option h3 {
        font-size: 18px;
    }
}

/* 大屏手机 */
@media (min-width: 481px) and (max-width: 768px) {
    .experience-options {
        flex-direction: row;
    }
    
    .experience-option {
        flex: 1;
    }
}

/* 平板 */
@media (min-width: 769px) and (max-width: 1024px) {
    .experience-selector-modal,
    .pwa-install-modal {
        max-width: 600px;
    }
    
    .experience-options {
        flex-direction: row;
        gap: 30px;
    }
}

/* 桌面端 */
@media (min-width: 1025px) {
    /* 桌面端不显示移动端体验选择器 */
    .experience-selector-overlay,
    .pwa-install-overlay {
        display: none;
    }
}

/* ==========================================================================
   深色模式适配
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .experience-selector-modal,
    .pwa-install-modal {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
        border-color: #222;
    }
    
    .experience-option {
        background: rgba(255, 255, 255, 0.03);
    }
    
    .experience-option:hover {
        background: rgba(0, 255, 136, 0.08);
    }
}

/* ==========================================================================
   高对比度模式适配
   ========================================================================== */

@media (prefers-contrast: high) {
    .experience-selector-modal,
    .pwa-install-modal {
        border: 2px solid #fff;
    }
    
    .experience-option {
        border: 1px solid #666;
    }
    
    .experience-option:hover {
        border-color: #00ff88;
    }
    
    .btn-select {
        border: 2px solid #000;
    }
}

/* ==========================================================================
   动画偏好适配
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .experience-selector-overlay,
    .pwa-install-overlay,
    .experience-selector-modal,
    .pwa-install-modal,
    .experience-option,
    .btn-select,
    .toast {
        transition: none;
        animation: none;
    }
    
    .experience-option:hover,
    .btn-select:hover {
        transform: none;
    }
}
