/* ===== 远程连接页面样式 ===== */

.remote-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.remote-container {
    width: 100%;
    max-width: 440px;
    padding: 0 1.5rem;
}

.hidden {
    display: none !important;
}

/* ===== 登录面板 ===== */
.login-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.login-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, var(--primary-glow), transparent 70%);
    opacity: 0.4;
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.login-icon {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.login-icon span {
    font-size: 1.8rem;
    z-index: 1;
}

.icon-ring-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: icon-ring-pulse 3s ease-in-out infinite;
}

.login-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== 表单 ===== */
.login-form {
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: var(--transition);
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.input-wrapper input::placeholder {
    color: rgba(200, 210, 240, 0.3);
}

.toggle-pwd {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: var(--transition);
    padding: 0.2rem;
}

.toggle-pwd:hover {
    opacity: 1;
}

.verify-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.verify-row input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: var(--transition);
    outline: none;
}

.verify-row input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.verify-row input::placeholder {
    color: rgba(200, 210, 240, 0.3);
}

.verify-canvas {
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    flex-shrink: 0;
    transition: var(--transition);
}

.verify-canvas:hover {
    border-color: var(--border-hover);
}

.form-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 180, 0, 0.08);
    border: 1px solid rgba(255, 180, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 200, 100, 0.8);
}

.notice-icon {
    font-size: 0.9rem;
}

.btn-login {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.login-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.login-footer a:hover {
    color: var(--primary);
}

/* ===== 连接中面板 ===== */
.connect-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
}

.connect-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.connect-ring {
    position: absolute;
    border: 2px solid;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cr-1 {
    width: 60px;
    height: 60px;
    border-color: rgba(0, 212, 255, 0.4);
    animation: connect-pulse 1.5s ease-in-out infinite;
}

.cr-2 {
    width: 90px;
    height: 90px;
    border-color: rgba(123, 47, 255, 0.3);
    animation: connect-pulse 1.5s ease-in-out infinite 0.3s;
}

.cr-3 {
    width: 120px;
    height: 120px;
    border-color: rgba(0, 212, 255, 0.15);
    animation: connect-pulse 1.5s ease-in-out infinite 0.6s;
}

.connect-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-glow);
    animation: dot-pulse 1s ease-in-out infinite;
}

.connect-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.connect-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.connect-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ===== 连接成功面板 ===== */
.connected-panel {
    background: var(--bg-card);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
}

.connected-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 30px var(--primary-glow);
    animation: success-bounce 0.6s ease;
}

.connected-panel h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.connected-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.connected-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.connected-actions .btn {
    min-width: 200px;
    justify-content: center;
}

/* ===== 错误面板 ===== */
.error-panel {
    background: var(--bg-card);
    border: 1px solid rgba(255, 80, 80, 0.3);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
}

.error-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 80, 80, 0.15);
    border: 2px solid rgba(255, 80, 80, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ff5050;
    margin: 0 auto 1.5rem;
}

.error-panel h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.error-msg {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* ===== 动画 ===== */
@keyframes connect-pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 10px var(--primary-glow); }
    50% { box-shadow: 0 0 25px var(--primary-glow), 0 0 50px var(--primary-glow); }
}

@keyframes success-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .remote-container {
        padding: 0 1rem;
    }

    .login-panel,
    .connect-panel,
    .connected-panel,
    .error-panel {
        padding: 2rem 1.5rem;
    }

    .verify-canvas {
        width: 100px;
        height: 36px;
    }
}