/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

/* 容器 */
.container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    touch-action: manipulation;
    padding-bottom: 80px;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 60px;
    position: relative;
    z-index: 2;
}

.logo h1 {
    font-size: 32px;
    color: #00d4ff;
    margin-bottom: 8px;
}

.logo p {
    font-size: 14px;
    color: #888;
}

/* 表单盒子 */
.form-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    touch-action: manipulation;
    pointer-events: auto;
}

/* 表单组 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.form-group input:focus {
    border-color: #00d4ff;
}

/* 按钮 */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 3;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
    touch-action: manipulation;
    min-height: 50px;
    line-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover, .btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

/* 切换文本 */
.toggle-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #888;
    position: relative;
    z-index: 2;
}

.toggle-text span {
    color: #00d4ff;
    cursor: pointer;
    display: inline-block;
    padding: 8px 16px;
    margin: -8px -16px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast-success {
    border-left: 4px solid #00d4ff;
}

.toast-error {
    border-left: 4px solid #ff4757;
}

.toast-warning {
    border-left: 4px solid #ffa502;
}

.toast-icon {
    font-size: 18px;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 14px;
    color: #fff;
}

.toast-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 导航栏 */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
    min-height: 60px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #888;
    cursor: pointer;
    padding: 5px 15px;
    transition: color 0.3s;
}

.nav-item.active {
    color: #00d4ff;
}

.nav-item i {
    font-size: 20px;
}

.nav-item span {
    font-size: 12px;
}

/* 首页卡片 */
.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.card-value {
    font-size: 24px;
    font-weight: 600;
    color: #00d4ff;
}

/* 服务器列表 */
.server-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.server-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.server-status {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.server-status.running {
    color: #00d4ff;
}

.server-status.stopped {
    color: #ff4757;
}

/* 响应式样式 */
@media (max-width: 375px) {
    .container {
        padding: 12px;
        padding-bottom: 90px;
    }
    
    .logo {
        padding-top: 40px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .form-box {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
        padding-bottom: 90px;
    }
}