/* 移动端专用样式 - 美化版本 */
@media screen and (max-width: 768px) {
    /* 基础设置 */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        box-sizing: border-box;
    }
    
    html, body {
        height: 100vh;
        height: 100dvh;
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    }
    
    body {
        font-size: 14px;
        line-height: 1.4;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
        position: relative;
    }

    /* 添加动态背景效果 */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: 
            radial-gradient(circle at 20% 80%, rgba(0, 255, 0, 0.03) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(0, 255, 0, 0.02) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(0, 255, 0, 0.01) 0%, transparent 50%);
        pointer-events: none;
        z-index: -1;
        animation: backgroundPulse 8s ease-in-out infinite;
    }

    @keyframes backgroundPulse {
        0%, 100% { opacity: 0.5; }
        50% { opacity: 1; }
    }

    /* 页面容器 */
    .page {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        width: 100%;
    }

    .terminal-container,
    .transfer-container {
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        width: 100%;
    }

    /* 连接页面优化 - 美化版本 */
    .terminal-header {
        padding: 15px 20px;
        flex-shrink: 0;
        min-height: 65px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(26, 26, 26, 0.9) 100%);
        border-bottom: 2px solid #00ff00;
        box-shadow: 0 2px 20px rgba(0, 255, 0, 0.1);
        backdrop-filter: blur(10px);
        position: relative;
    }

    .terminal-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, #00ff00, transparent);
        animation: headerGlow 3s ease-in-out infinite;
    }

    @keyframes headerGlow {
        0%, 100% { opacity: 0.3; }
        50% { opacity: 1; }
    }

    .terminal-title {
        font-size: 18px;
        text-align: center;
        flex: 1;
        color: #00ff00;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-shadow: 0 0 15px #00ff00;
        animation: titlePulse 2s ease-in-out infinite;
    }

    @keyframes titlePulse {
        0%, 100% { text-shadow: 0 0 15px #00ff00; }
        50% { text-shadow: 0 0 25px #00ff00, 0 0 35px #00ff00; }
    }

    .terminal-controls {
        display: flex;
        gap: 8px;
    }

    .control-dot {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        box-shadow: 0 0 10px currentColor;
        animation: dotBlink 2s ease-in-out infinite;
    }

    .control-dot.red { 
        background: #ff5f56;
        animation-delay: 0s;
    }
    
    .control-dot.yellow { 
        background: #ffbd2e;
        animation-delay: 0.3s;
    }
    
    .control-dot.green { 
        background: #27ca3f;
        animation-delay: 0.6s;
    }

    @keyframes dotBlink {
        0%, 100% { opacity: 0.7; transform: scale(1); }
        50% { opacity: 1; transform: scale(1.1); }
    }

    .connection-section {
        flex: 1;
        padding: 20px 15px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        max-width: none;
        margin: 0;
        gap: 20px;
        min-height: 0;
        position: relative;
        padding-top: 30px;
    }

    .section-header {
        font-size: 20px;
        margin-bottom: 0;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        color: #00ff00;
        font-weight: bold;
        text-shadow: 0 0 20px #00ff00;
        animation: sectionHeaderGlow 3s ease-in-out infinite;
    }

    .section-header i {
        font-size: 24px;
    }

    @keyframes sectionHeaderGlow {
        0%, 100% { 
            text-shadow: 0 0 20px #00ff00;
            transform: scale(1);
        }
        50% { 
            text-shadow: 0 0 30px #00ff00, 0 0 40px #00ff00;
            transform: scale(1.02);
        }
    }

    .device-info {
        padding: 25px 20px;
        margin-bottom: 0;
        border: 2px solid #00ff00;
        border-radius: 15px;
        background: linear-gradient(135deg, rgba(0, 255, 0, 0.08) 0%, rgba(0, 255, 0, 0.03) 100%);
        box-shadow: 
            0 0 30px rgba(0, 255, 0, 0.2),
            inset 0 0 30px rgba(0, 255, 0, 0.05);
        position: relative;
        overflow: visible;
        animation: deviceInfoPulse 4s ease-in-out infinite;
        min-height: auto;
    }

    @keyframes deviceInfoPulse {
        0%, 100% { 
            transform: scale(1);
            box-shadow: 0 0 30px rgba(0, 255, 0, 0.2), inset 0 0 30px rgba(0, 255, 0, 0.05);
        }
        50% { 
            transform: scale(1.01);
            box-shadow: 0 0 40px rgba(0, 255, 0, 0.3), inset 0 0 40px rgba(0, 255, 0, 0.08);
        }
    }

    .info-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
        text-align: center;
        align-items: center;
        width: 100%;
    }

    .label {
        font-size: 14px;
        color: #888;
        margin-bottom: 5px;
        text-shadow: 0 0 10px rgba(136, 136, 136, 0.5);
        animation: labelGlow 2s ease-in-out infinite;
    }

    @keyframes labelGlow {
        0%, 100% { opacity: 0.8; }
        50% { opacity: 1; }
    }

    .device-code {
        font-size: 28px;
        letter-spacing: 4px;
        word-break: break-all;
        color: #00ff00;
        font-weight: bold;
        padding: 20px 15px;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
        border-radius: 10px;
        border: 2px solid #00ff00;
        font-family: 'Courier New', monospace;
        width: 100%;
        max-width: 280px;
        box-sizing: border-box;
        text-shadow: 0 0 15px #00ff00;
        box-shadow: 
            0 0 25px rgba(0, 255, 0, 0.3),
            inset 0 0 15px rgba(0, 255, 0, 0.1);
        animation: codeGlow 3s ease-in-out infinite;
        position: relative;
        overflow: hidden;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .device-code::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.2), transparent);
        animation: codeScan 2s linear infinite;
    }

    @keyframes codeGlow {
        0%, 100% { 
            box-shadow: 0 0 30px rgba(0, 255, 0, 0.3), inset 0 0 20px rgba(0, 255, 0, 0.1);
            transform: scale(1);
        }
        50% { 
            box-shadow: 0 0 40px rgba(0, 255, 0, 0.5), inset 0 0 30px rgba(0, 255, 0, 0.2);
            transform: scale(1.02);
        }
    }

    @keyframes codeScan {
        0% { left: -100%; }
        100% { left: 100%; }
    }

    .icon-btn {
        padding: 18px 22px;
        font-size: 22px;
        min-height: 56px;
        min-width: 56px;
        border-radius: 12px;
        background: linear-gradient(135deg, #333 0%, #444 100%);
        color: #00ff00;
        border: 2px solid #00ff00;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
        position: relative;
        overflow: hidden;
    }

    .icon-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(0, 255, 0, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: all 0.3s ease;
    }

    .icon-btn:hover {
        background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
        color: #000;
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 5px 30px rgba(0, 255, 0, 0.4);
    }

    .icon-btn:hover::before {
        width: 100%;
        height: 100%;
    }

    .icon-btn:active {
        transform: translateY(0) scale(0.98);
    }

    /* 连接输入区域 - 修复版本 */
    .connect-section {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .input-group {
        display: flex;
        flex-direction: column;
        border: 2px solid #00ff00;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
        overflow: hidden;
        margin-bottom: 20px;
        box-shadow: 
            0 0 25px rgba(0, 255, 0, 0.2),
            inset 0 0 15px rgba(0, 255, 0, 0.05);
        position: relative;
        animation: inputGroupPulse 4s ease-in-out infinite;
    }

    @keyframes inputGroupPulse {
        0%, 100% { 
            box-shadow: 0 0 30px rgba(0, 255, 0, 0.2), inset 0 0 20px rgba(0, 255, 0, 0.05);
        }
        50% { 
            box-shadow: 0 0 40px rgba(0, 255, 0, 0.3), inset 0 0 30px rgba(0, 255, 0, 0.08);
        }
    }

    .input-icon {
        padding: 20px;
        text-align: center;
        background: linear-gradient(135deg, rgba(0, 255, 0, 0.15) 0%, rgba(0, 255, 0, 0.08) 100%);
        border-bottom: 2px solid rgba(0, 255, 0, 0.3);
        color: #00ff00;
        font-size: 24px;
        text-shadow: 0 0 15px #00ff00;
        animation: iconPulse 2s ease-in-out infinite;
    }

    @keyframes iconPulse {
        0%, 100% { 
            transform: scale(1);
            text-shadow: 0 0 15px #00ff00;
        }
        50% { 
            transform: scale(1.1);
            text-shadow: 0 0 25px #00ff00, 0 0 35px #00ff00;
        }
    }

    #connect-to-id {
        font-size: 24px;
        padding: 20px 15px;
        text-align: center;
        letter-spacing: 4px;
        background: transparent;
        border: none;
        color: #00ff00;
        outline: none;
        font-family: 'Courier New', monospace;
        font-weight: bold;
        min-height: 60px;
        text-shadow: 0 0 15px #00ff00;
        transition: all 0.3s ease;
        position: relative;
    }

    #connect-to-id:focus {
        text-shadow: 0 0 25px #00ff00, 0 0 35px #00ff00;
        transform: scale(1.01);
    }

    #connect-to-id::placeholder {
        color: #666;
        font-weight: normal;
        letter-spacing: 2px;
        text-shadow: none;
        animation: placeholderBlink 2s ease-in-out infinite;
    }

    @keyframes placeholderBlink {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 1; }
    }

    .connect-btn {
        padding: 20px 25px;
        font-size: 18px;
        min-height: 60px;
        background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
        color: #000;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        font-weight: bold;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 2px;
        box-shadow: 
            0 0 25px rgba(0, 255, 0, 0.4),
            inset 0 0 15px rgba(255, 255, 255, 0.1);
        position: relative;
        overflow: hidden;
    }

    .connect-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: buttonScan 2s linear infinite;
    }

    @keyframes buttonScan {
        0% { left: -100%; }
        100% { left: 100%; }
    }

    .connect-btn:hover {
        background: linear-gradient(135deg, #00ff00 0%, #00aa00 100%);
        transform: translateY(-3px) scale(1.02);
        box-shadow: 
            0 5px 40px rgba(0, 255, 0, 0.6),
            inset 0 0 30px rgba(255, 255, 255, 0.2);
    }

    .connect-btn:active {
        transform: translateY(-1px) scale(0.98);
    }

    .connect-btn:disabled {
        background: linear-gradient(135deg, #333 0%, #222 100%);
        color: #666;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }

    .connect-btn:disabled::before {
        display: none;
    }

    /* 状态区域 - 修复版本 */
    .status-section {
        text-align: center;
        padding: 20px 15px;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
        border-radius: 12px;
        border: 2px solid rgba(0, 255, 0, 0.3);
        margin-top: 10px;
        box-shadow: 
            0 0 25px rgba(0, 255, 0, 0.1),
            inset 0 0 15px rgba(0, 255, 0, 0.05);
        position: relative;
        overflow: hidden;
        min-height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .status-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
        animation: statusScan 3s linear infinite;
    }

    @keyframes statusScan {
        0% { left: -100%; }
        100% { left: 100%; }
    }

    .status-indicator {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        font-size: 16px;
        font-weight: 600;
        text-shadow: 0 0 10px currentColor;
        position: relative;
        z-index: 1;
        width: 100%;
    }

    .status-dot {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        flex-shrink: 0;
        position: relative;
        animation: statusPulse 2s ease-in-out infinite;
    }

    .status-dot::before {
        content: '';
        position: absolute;
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        border-radius: 50%;
        border: 2px solid currentColor;
        opacity: 0;
        animation: statusRipple 2s ease-in-out infinite;
    }

    .status-dot.offline {
        background: #ff4444;
        color: #ff4444;
        box-shadow: 
            0 0 20px rgba(255, 68, 68, 0.5),
            inset 0 0 10px rgba(255, 68, 68, 0.3);
    }

    .status-dot.online {
        background: #00ff00;
        color: #00ff00;
        box-shadow: 
            0 0 20px rgba(0, 255, 0, 0.5),
            inset 0 0 10px rgba(0, 255, 0, 0.3);
    }

    .status-dot.connecting {
        background: #ffaa00;
        color: #ffaa00;
        box-shadow: 
            0 0 20px rgba(255, 170, 0, 0.5),
            inset 0 0 10px rgba(255, 170, 0, 0.3);
    }

    @keyframes statusPulse {
        0%, 100% { 
            transform: scale(1);
            opacity: 1;
        }
        50% { 
            transform: scale(1.2);
            opacity: 0.8;
        }
    }

    @keyframes statusRipple {
        0% {
            transform: scale(1);
            opacity: 0.8;
        }
        100% {
            transform: scale(2);
            opacity: 0;
        }
    }

    /* 状态文本动画 */
    #status-text {
        animation: statusTextGlow 2s ease-in-out infinite;
    }

    @keyframes statusTextGlow {
        0%, 100% { 
            text-shadow: 0 0 10px currentColor;
        }
        50% { 
            text-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
        }
    }

    /* 传输页面优化 */
    .transfer-header {
        padding: 10px 15px;
        flex-shrink: 0;
        background: rgba(0, 0, 0, 0.9);
        border-bottom: 1px solid #333;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 60px;
    }

    .header-left,
    .header-center,
    .header-right {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .header-left {
        justify-content: flex-start;
    }

    .header-center {
        justify-content: center;
    }

    .header-right {
        justify-content: flex-end;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
        border-radius: 6px;
        background: #333;
        color: #00ff00;
        border: 1px solid #555;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-weight: 500;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-btn.danger {
        color: #ff4444;
        border-color: #ff4444;
    }

    .nav-btn.danger:hover {
        background: rgba(255, 68, 68, 0.1);
    }

    .connection-info {
        font-size: 11px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2px;
        padding: 4px 8px;
        background: rgba(0, 255, 0, 0.1);
        border: 1px solid rgba(0, 255, 0, 0.3);
        border-radius: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
        min-height: 36px;
    }

    .connection-icon {
        color: #00ff00;
        font-size: 16px;
    }

    .peer-id {
        color: #00ff00;
        font-weight: bold;
        font-family: 'Courier New', monospace;
        letter-spacing: 1px;
    }

    /* 传输内容区域 */
    .transfer-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .transfer-panel {
        flex: none;
        margin-bottom: 10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: 1px solid #333;
        border-bottom: 1px solid #333;
        background: rgba(0, 0, 0, 0.3);
    }

    .panel-header {
        padding: 15px;
        font-size: 16px;
        background: rgba(0, 255, 0, 0.1);
        border-bottom: 1px solid #333;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #00ff00;
    }

    /* 文件拖拽区域 - 美化版本 */
    .file-drop-zone {
        margin: 20px;
        padding: 35px 20px;
        border: 3px dashed rgba(0, 255, 0, 0.3);
        border-radius: 20px;
        min-height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.4s ease;
        background: linear-gradient(135deg, rgba(0, 255, 0, 0.02) 0%, rgba(0, 255, 0, 0.05) 100%);
        position: relative;
        overflow: hidden;
    }

    .file-drop-zone::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
        animation: dropZoneScan 4s linear infinite;
    }

    @keyframes dropZoneScan {
        0% { left: -100%; }
        100% { left: 100%; }
    }

    .file-drop-zone:hover,
    .file-drop-zone.drag-over {
        border-color: #00ff00;
        background: linear-gradient(135deg, rgba(0, 255, 0, 0.08) 0%, rgba(0, 255, 0, 0.12) 100%);
        box-shadow: 
            0 0 30px rgba(0, 255, 0, 0.3),
            inset 0 0 20px rgba(0, 255, 0, 0.1);
        transform: scale(1.02);
    }

    .drop-content {
        text-align: center;
        color: #888;
        position: relative;
        z-index: 1;
    }

    .drop-icon {
        font-size: 40px;
        margin-bottom: 15px;
        color: #00ff00;
        text-shadow: 0 0 20px #00ff00;
        animation: dropIconFloat 3s ease-in-out infinite;
    }

    @keyframes dropIconFloat {
        0%, 100% { 
            transform: translateY(0px);
            text-shadow: 0 0 20px #00ff00;
        }
        50% { 
            transform: translateY(-5px);
            text-shadow: 0 0 30px #00ff00, 0 0 40px #00ff00;
        }
    }

    .drop-text {
        font-size: 16px;
        margin-bottom: 8px;
        color: #00ff00;
        font-weight: 600;
        text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    }

    .drop-subtext {
        font-size: 14px;
        color: #888;
        opacity: 0.8;
        animation: subtextBlink 2s ease-in-out infinite;
    }

    @keyframes subtextBlink {
        0%, 100% { opacity: 0.8; }
        50% { opacity: 1; }
    }

    /* 文件列表优化 */
    .selected-files-section,
    .received-files-section {
        padding: 15px;
        flex: 1;
        min-height: 150px;
    }

    .section-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 15px;
        font-size: 14px;
        color: #888;
    }

    .file-list {
        max-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #333;
        border-radius: 6px;
        background: rgba(0, 0, 0, 0.2);
    }

    .file-item {
        padding: 10px;
        margin-bottom: 0;
        border-bottom: 1px solid #333;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        background: rgba(0, 0, 0, 0.3);
    }

    .file-item:last-child {
        border-bottom: none;
    }

    .file-info {
        flex: 1;
        text-align: left;
        min-width: 0;
    }

    .file-name {
        font-size: 14px;
        margin-bottom: 2px;
        word-break: break-all;
        line-height: 1.2;
        color: #00ff00;
    }

    .file-size {
        font-size: 11px;
        color: #888;
        margin-bottom: 2px;
    }

    .file-status {
        font-size: 10px;
        color: #666;
    }

    .file-actions {
        display: flex;
        gap: 5px;
        flex-shrink: 0;
    }

    /* 按钮优化 - 美化版本 */
    .action-btn {
        padding: 18px 25px;
        font-size: 18px;
        min-height: 56px;
        border-radius: 15px;
        width: 100%;
        margin-top: 15px;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 2px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .send-btn {
        background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
        color: #000;
        box-shadow: 
            0 0 30px rgba(0, 255, 0, 0.4),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
    }

    .send-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: buttonShine 2s linear infinite;
    }

    @keyframes buttonShine {
        0% { left: -100%; }
        100% { left: 100%; }
    }

    .send-btn:hover {
        background: linear-gradient(135deg, #00ff00 0%, #00aa00 100%);
        transform: translateY(-3px) scale(1.02);
        box-shadow: 
            0 8px 40px rgba(0, 255, 0, 0.6),
            inset 0 0 30px rgba(255, 255, 255, 0.2);
    }

    .send-btn:active {
        transform: translateY(-1px) scale(0.98);
    }

    .send-btn:disabled {
        background: linear-gradient(135deg, #333 0%, #222 100%);
        color: #666;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }

    .send-btn:disabled::before {
        display: none;
    }

    .send-btn.sending {
        background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
        color: #000;
        animation: sendingPulse 1.5s ease-in-out infinite;
    }

    @keyframes sendingPulse {
        0%, 100% { 
            box-shadow: 0 0 30px rgba(255, 170, 0, 0.4);
            transform: scale(1);
        }
        50% { 
            box-shadow: 0 0 40px rgba(255, 170, 0, 0.6);
            transform: scale(1.02);
        }
    }

    .terminal-btn {
        min-height: 36px;
        font-size: 12px;
        padding: 8px 12px;
        border-radius: 4px;
        background: #333;
        color: #00ff00;
        border: 1px solid #555;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .terminal-btn:hover {
        background: #444;
    }

    /* 统计区域 */
    .transfer-stats {
        padding: 15px;
        border-top: 1px solid #333;
        background: rgba(0, 0, 0, 0.2);
    }

    .stats-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 15px;
        font-size: 14px;
        color: #888;
    }

    .stats-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .stat-item {
        padding: 10px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid #333;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 255, 0, 0.1);
        border-radius: 4px;
        color: #00ff00;
    }

    .stat-info {
        flex: 1;
    }

    .stat-value {
        font-size: 16px;
        font-weight: bold;
        color: #00ff00;
    }

    .stat-label {
        font-size: 11px;
        color: #888;
    }

    /* 底部命令区域 - 在移动端隐藏 */
    .command-footer {
        display: none;
    }

    /* 进度覆盖层 */
    .progress-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }

    .progress-overlay.hidden {
        display: none;
    }

    .progress-content {
        margin: 20px;
        padding: 25px 20px;
        min-width: auto;
        max-width: calc(100vw - 40px);
        border-radius: 8px;
        background: #1a1a1a;
        border: 1px solid #333;
    }

    .progress-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
        font-size: 16px;
        color: #00ff00;
    }

    .progress-filename {
        font-size: 14px;
        word-break: break-all;
        line-height: 1.3;
        margin-bottom: 10px;
        color: #fff;
    }

    .progress-details {
        display: flex;
        justify-content: space-between;
        margin-bottom: 15px;
        font-size: 12px;
    }

    .progress-percent {
        color: #00ff00;
        font-weight: bold;
    }

    .progress-speed {
        color: #888;
    }

    .progress-bar-container {
        height: 6px;
        background: #333;
        border-radius: 3px;
        overflow: hidden;
    }

    .progress-bar {
        height: 100%;
        background: #00ff00;
        transition: width 0.3s ease;
        width: 0%;
    }

    /* 模态框优化 */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }

    .modal.hidden {
        display: none;
    }

    .modal-content {
        margin: 20px;
        padding: 30px 20px;
        max-width: calc(100vw - 40px);
        border-radius: 8px;
        background: #1a1a1a;
        border: 1px solid #333;
        text-align: center;
    }

    .success-content {
        background: rgba(0, 255, 0, 0.05);
        border-color: #00ff00;
    }

    .success-icon {
        font-size: 48px;
        color: #00ff00;
        margin-bottom: 15px;
    }

    .success-title {
        font-size: 20px;
        color: #00ff00;
        margin-bottom: 10px;
        font-weight: bold;
    }

    .success-message {
        font-size: 14px;
        color: #fff;
        margin-bottom: 10px;
    }

    .success-subtitle {
        font-size: 14px;
        color: #888;
        margin-bottom: 20px;
        word-break: break-all;
    }

    .success-btn {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 44px;
        border-radius: 6px;
        width: 100%;
        background: #00ff00;
        color: #000;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-weight: bold;
    }

    .success-btn:hover {
        background: #00cc00;
    }

    /* 无文件状态 */
    .no-files {
        padding: 30px 15px;
        font-size: 14px;
        text-align: center;
        color: #666;
    }

    .no-files i {
        font-size: 32px;
        margin-bottom: 8px;
        color: #333;
    }

    .no-files p {
        margin: 0;
    }
}

/* 小屏幕设备优化 */
@media screen and (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .connection-section {
        padding: 15px 10px;
        gap: 15px;
        justify-content: flex-start;
        padding-top: 20px;
    }

    .section-header {
        font-size: 18px;
        margin-bottom: 0;
    }

    .device-info {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .device-code {
        font-size: 24px;
        letter-spacing: 3px;
        padding: 18px 12px;
        max-width: 260px;
        min-height: 55px;
    }

    .label {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .icon-btn {
        padding: 15px 18px;
        font-size: 18px;
        min-height: 50px;
        min-width: 50px;
        border-radius: 10px;
    }

    .input-group {
        border-radius: 10px;
        margin-bottom: 15px;
    }

    .input-icon {
        padding: 15px;
        font-size: 20px;
    }

    #connect-to-id {
        font-size: 20px;
        padding: 18px 12px;
        min-height: 55px;
        letter-spacing: 3px;
    }

    .connect-btn {
        padding: 18px 20px;
        font-size: 16px;
        min-height: 55px;
        letter-spacing: 1px;
    }

    .status-section {
        padding: 15px 10px;
        min-height: 60px;
        border-radius: 10px;
        margin-top: 5px;
    }

    .status-indicator {
        font-size: 14px;
        gap: 12px;
    }

    .status-dot {
        width: 16px;
        height: 16px;
    }

    .file-drop-zone {
        margin: 10px;
        padding: 20px 10px;
        min-height: 80px;
        border-radius: 15px;
    }

    .drop-icon {
        font-size: 28px;
    }

    .drop-text {
        font-size: 14px;
    }

    .drop-subtext {
        font-size: 12px;
    }

    .transfer-panel {
        margin-bottom: 5px;
    }

    .selected-files-section,
    .received-files-section {
        padding: 10px;
        min-height: 120px;
    }

    .file-list {
        max-height: 150px;
    }

    .progress-content {
        margin: 15px;
        padding: 20px 15px;
    }

    .modal-content {
        margin: 15px;
        padding: 25px 15px;
    }
}

/* 超小屏幕设备优化 */
@media screen and (max-width: 360px) {
    .connection-section {
        padding: 10px 8px;
        gap: 12px;
    }

    .device-code {
        font-size: 20px;
        letter-spacing: 2px;
        padding: 15px 10px;
        max-width: 240px;
    }

    .section-header {
        font-size: 16px;
    }

    #connect-to-id {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .connect-btn {
        font-size: 14px;
        padding: 15px 18px;
    }

    .status-indicator {
        font-size: 13px;
        gap: 10px;
    }
}

/* 横屏优化 */
@media screen and (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .connection-section {
        justify-content: flex-start;
        padding: 10px 15px;
    }

    .section-header {
        margin-bottom: 15px;
        font-size: 16px;
    }

    .device-info {
        margin-bottom: 15px;
        padding: 15px;
    }

    .device-code {
        font-size: 20px;
    }

    .transfer-content {
        flex-direction: row;
        gap: 10px;
        padding: 10px;
    }

    .transfer-panel {
        flex: 1;
        margin-bottom: 0;
        border-radius: 8px;
        border: 1px solid #333;
    }

    .file-list {
        max-height: 120px;
    }

    .selected-files-section,
    .received-files-section {
        min-height: auto;
        padding: 10px;
    }

    .file-drop-zone {
        margin: 10px;
        padding: 15px 10px;
        min-height: 60px;
    }

    .drop-icon {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .drop-text {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .drop-subtext {
        font-size: 10px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .file-drop-zone {
        border-style: solid;
        background: rgba(0, 255, 0, 0.05);
    }

    .icon-btn,
    .nav-btn,
    .action-btn,
    .terminal-btn {
        min-height: 44px;
        min-width: 44px;
    }
}